3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Paul Colomiets 2014-06-25 01:12:10 +03:00
parent 41f5e0121c
commit c1e24abfef

View file

@ -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"