nix-config/packages/tag-release.nix
Oliver Davies 5341b761ad
All checks were successful
/ check (push) Successful in 1m40s
Combine scripts and custom packages
2025-07-10 22:51:55 +01:00

17 lines
328 B
Nix

{ 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}"
'';
}