diff --git a/pz b/pz index fdd9019..c8f2762 100755 --- a/pz +++ b/pz @@ -43,10 +43,10 @@ if [ -z "$destdir" ]; then fi setx name=basename -- "$projdir" -setx version=pver --show --allow-empty -version="${version%+*}" -setx branch=git_get_branch -dest="$destdir/$name${version:+-$version}+$branch.tgz" +setx branch=git rev-parse --short HEAD 2>/dev/null +setx version=pver --show --allow-empty --add-metadata "$branch" +[ -n "$version" ] || version="+$branch" +dest="$destdir/$name${version:+-$version}.tgz" estep "Création de $(ppath "$dest")" git archive -o "$dest" --prefix="$name${version:+-$version}/" HEAD