Skip to content

Commit

Permalink
Do not error if license needs updating
Browse files Browse the repository at this point in the history
This means our jobs don't fail when we use this script while
creating a new PR from Common
  • Loading branch information
DorkMatter committed Nov 10, 2023
1 parent e14eca3 commit 8781d53
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/release/check-license.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# This script fetches the LICENSE.md from the version specified in Package.swift
# and returns 0 if it matches the LICENSE.md in this repository.
# and outputs whether it matches the LICENSE.md in this repository. It modifies the
# LICENSE.md file so a commit of the file will update the license.

set -eo pipefail

Expand All @@ -23,10 +24,9 @@ NEW_LICENSE="${ROOT_DIR}/LICENSE.md"
STATUS="$(cmp --silent $OLD_LICENSE $NEW_LICENSE; echo $?)"

if [[ $STATUS -ne 0 ]]; then # if status isn't equal to 0, then execute code
echo "LICENSE.md in the binary and inside this repository doesn't match."
exit 1
echo "The LICENSE.md in the binary and inside this repository doesn't match."
else
echo "The LICENSE.md in the binary and inside this repository matches."
rm -rf "${ROOT_DIR}/LICENSE.md.old"
exit 0
fi
rm -rf "${ROOT_DIR}/LICENSE.md.old"
exit 0

0 comments on commit 8781d53

Please sign in to comment.