mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nix-prefetch-git: print commit date (close #6522)
The commit date can be used as a version number in packages that don't have proper releases.
This commit is contained in:
parent
030eed8307
commit
06f5651ef5
@ -254,6 +254,7 @@ clone_user_rev() {
|
||||
local full_revision=$(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)
|
||||
echo "git revision is $full_revision"
|
||||
echo "git human-readable version is $(cd $dir && (git describe $full_revision 2> /dev/null || git describe --tags $full_revision 2> /dev/null || echo -- none --))" >&2
|
||||
echo "Commit date is $(cd $dir && git show --no-patch --pretty=%ci $full_revision)"
|
||||
|
||||
# Allow doing additional processing before .git removal
|
||||
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
||||
|
Loading…
Reference in New Issue
Block a user