Skip to content

Commit

Permalink
release: change order of checks in release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Dec 25, 2021
1 parent d9dbf53 commit fce2a29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ read -p 'Are you *really* sure you want to proceed? (y/n) ' -n 1 -r < /dev/tty
echo
[[ ! $REPLY =~ ^[Yy]$ ]] && echo 'Release aborted.' && exit 1

# Check if version is in the changelog
grep '^# '"$version" ChangeLog.md >/dev/null
[ $? -ne 0 ] && echo 'Error: Version is not present in the changelog' && exit 1

# Check for uncomitted changes
git diff --quiet HEAD >/dev/null
[ $? -ne 0 ] && echo -e '\nError: Uncomitted changes found' && exit 1
Expand All @@ -106,10 +110,6 @@ git rev-list --max-count=1 $version >/dev/null 2>/dev/null
git ls-remote $remote | grep "refs/tags/$version$" >/dev/null
[ $? -eq 0 ] && echo -e '\nError: Tag already exists on remote' && exit 1

# Check if version is in the changelog
grep '^# '"$version" ChangeLog.md >/dev/null
[ $? -ne 0 ] && echo 'Error: Version is not present in the changelog' && exit 1

echo

# Create tag
Expand Down

0 comments on commit fce2a29

Please sign in to comment.