Skip to content

Commit

Permalink
Update pre-release script to allow for version changes
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jul 19, 2023
1 parent 2c7719d commit 0fa7df5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/pre-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ set -e
CURRENT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
BRANCH_NAME="pre-release-$CURRENT_BRANCH_NAME"

# Check if there are files that need to be commited
if [[ -n $(git status --porcelain) ]]; then
echo "⚠️ You have unstaged files, please commit these and then try again."
# Check if there are unexpected changes. Changes to package.json and
# package-lock.json files are expected as part of the pre-release process.
changes="$(git status --porcelain -- ':!packages/govuk-frontend/package.json' ':!package-lock.json')"
if [[ -n $changes ]]; then
echo "⚠ Unexpected changes in your working directory:"
echo "$changes"
exit 1
fi

Expand Down

0 comments on commit 0fa7df5

Please sign in to comment.