diff options
author | Paul Colomiets <paul@colomiets.name> | 2014-06-25 01:12:10 +0300 |
---|---|---|
committer | Paul Colomiets <paul@colomiets.name> | 2014-06-25 01:12:10 +0300 |
commit | c1e24abfef0d6d8ac71c7634439f5dfaffdae1ce (patch) | |
tree | a9fce81bc217afecdeac27a14c7afc51662d66e3 /pkgs/build-support/fetchgit/nix-prefetch-git | |
parent | 41f5e0121c0a76bf234db1285a02996f9a1a677c (diff) |
Print output of `git describe` in `nix-prefetch-git`
I hope it will help make git-packages' versions much nicer
It's usually only useful in --deepClone is also specified.
Diffstat (limited to 'pkgs/build-support/fetchgit/nix-prefetch-git')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 3574f3b7539b..bd1d8b5c1af0 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -217,7 +217,9 @@ clone_user_rev() { fi;; esac - echo "git revision is $(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)" + 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 --))" # Allow doing additional processing before .git removal eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" |