Skip to content
Snippets Groups Projects
Commit c47808fc authored by Rory Jennings's avatar Rory Jennings
Browse files

feat: add run-tag-pipeline option to release.sh

parent f9c1b498
No related branches found
No related tags found
1 merge request!4Add a --run-tag-pipeline flag to the release script
Pipeline #8104 passed
......@@ -10,4 +10,35 @@ cd "$CI_PROJECT_NAME"
standard-version
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
\ 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