utiliser nouvelle API --add-metadata

This commit is contained in:
Jephte CLAIN 2015-03-26 20:05:58 +04:00
parent 259e1be6dc
commit 8ae0a8d770
1 changed files with 4 additions and 4 deletions

8
pz
View File

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