Skip to content
Snippets Groups Projects
Commit fe5ee5a8 authored by Dean Lovett's avatar Dean Lovett
Browse files

Merge branch '4-add-a-run-tag-pipeline-flag-to-the-release-script' into 'master'

Add a --run-tag-pipeline flag to the release script

Closes #4

See merge request !4
parents f9c1b498 c47808fc
No related branches found
No related tags found
1 merge request!4Add a --run-tag-pipeline flag to the release script
Pipeline #8190 passed
...@@ -10,4 +10,35 @@ cd "$CI_PROJECT_NAME" ...@@ -10,4 +10,35 @@ cd "$CI_PROJECT_NAME"
standard-version standard-version
echo "Pushing new commit" echo "Pushing new commit"
# Check arguments for --run-tag-pipeline
while :; do
case $1 in
-t|--run-tag-pipeline)
# Push the commit separately from the tag
git push -o ci.skip
# Grab the tag at this commit
TAG=$(git tag --points-at HEAD)
# Push the tag to origin
git push origin "$TAG"
exit
;;
--)
# End of options
shift
break
;;
-?*)
# Unrecognised option - ignore and continue
printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2
;;
*)
# Default case, flag not found, break out and continue with the default command
break
esac
shift
done
# No flag passed, follow-tags instead
git push --follow-tags -o ci.skip git push --follow-tags -o ci.skip
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment