Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
ci: fix the publication process of a version already released
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-cristea committed Nov 22, 2021
1 parent 8332f2c commit a3b8f60
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/scripts/check_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ version=`grep "^version" gradle.properties | cut -d= -f2 | tr -d "[:space:]"`
echo "Version in 'gradle.properties' file: '$version'"

if [ "$tag" != "" ]; then
echo "Release mode: check version consistency..."
if [ "$tag" != "$version" ]; then
echo "ERROR: the tag '$tag' is different from the version '$version' in the 'gradle.properties' file"
exit 1
fi
fi

echo "Fetch tags..."
git fetch --tags

if [ $(git tag -l "$version") ]; then
echo "ERROR: version '$version' has already been released"
exit 1
else
echo "Snapshot mode: fetch existing tags..."
git fetch --tags
if [ $(git tag -l "$version") ]; then
echo "ERROR: version '$version' has already been released"
exit 1
fi
fi

0 comments on commit a3b8f60

Please sign in to comment.