Skip to content
Snippets Groups Projects
Commit bd81a32d authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Skip tag creation if tag already exists

parent 4f766205
No related branches found
No related tags found
1 merge request!7Resolve "Skip create tag if it already exists"
Pipeline #1496 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment