Allow for prefixing a tag
This is useful when tagging releases within a monorepo. Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
10a38aa3e2
commit
183e6836b1
1 changed files with 4 additions and 0 deletions
|
@ -7,8 +7,12 @@ writeShellApplication {
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
commit_sha="''${1:-HEAD}"
|
commit_sha="''${1:-HEAD}"
|
||||||
|
prefix="''${2:-}"
|
||||||
|
|
||||||
tag="$(date '+%Y%m%d%R%S' | sed "s/://g")"
|
tag="$(date '+%Y%m%d%R%S' | sed "s/://g")"
|
||||||
|
|
||||||
|
test "$prefix" != "" && tag="$prefix/$tag"
|
||||||
|
|
||||||
echo "Tagging commit $(git rev-parse "''${commit_sha}") as ''${tag}."
|
echo "Tagging commit $(git rev-parse "''${commit_sha}") as ''${tag}."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue