This commit is contained in:
parent
7780eca7a9
commit
5341b761ad
15 changed files with 29 additions and 38 deletions
17
packages/tag-release.nix
Normal file
17
packages/tag-release.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ git, writeShellApplication }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "tag-release";
|
||||
|
||||
runtimeInputs = [ git ];
|
||||
|
||||
text = ''
|
||||
commit_sha="''${1:-HEAD}"
|
||||
tag="$(date '+%Y-%m-%d-%H.%M.%S')"
|
||||
|
||||
echo "Tagging commit $(git rev-parse "''${commit_sha}") as ''${tag}."
|
||||
echo ""
|
||||
|
||||
git tag "''${tag}" "''${commit_sha}"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue