Skip to content
Snippets Groups Projects

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

Merged Rory Jennings requested to merge 4-add-a-run-tag-pipeline-flag-to-the-release-script into master
1 file
+ 31
0
Compare changes
  • Side-by-side
  • Inline
+ 31
0
@@ -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
Loading