Skip to content
Snippets Groups Projects

Resolve "Skip create tag if it already exists"

Merged Benoît Harrault requested to merge 9-skip-create-tag-if-it-already-exists into master
1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
+ 7
2
@@ -94,8 +94,13 @@ application:release:
- VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
- TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
- echo "${TAG_NAME}"
- git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})"
- git push origin "${TAG_NAME}"
- >
if [ $(git tag -l "${TAG_NAME}") ]; then
echo "Tag ${TAG_NAME} already exists. Skipping release and tag creation."
else
git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})"
git push origin "${TAG_NAME}"
fi
android:deploy:
stage: deploy
Loading