mirror of
https://github.com/zigzap/zap.git
synced 2025-10-21 07:34:08 +00:00
create-archive: more useful now!
This commit is contained in:
parent
4dc997e39f
commit
81e6149d83
1 changed files with 29 additions and 3 deletions
|
@ -1,7 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
tag=$1
|
||||
if [ "$tag" == "" ] ; then
|
||||
echo provide tag
|
||||
exit 1
|
||||
override=$2
|
||||
|
||||
if [ "$tag" == "--override" ] ; then
|
||||
override=$tag
|
||||
tag=""
|
||||
fi
|
||||
|
||||
if [ "$tag" == "" ] ; then
|
||||
tag=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "Warning: no tag provided, using: >> $tag <<"
|
||||
fi
|
||||
|
||||
|
||||
git archive --format=tar.gz -o ${tag}.tar.gz --prefix=zap-$tag/ HEAD
|
||||
|
||||
if [ git diff --quiet ] ; then
|
||||
./zig-out/bin/pkghash -g --tag=$tag --template=doc/release-template.md
|
||||
else
|
||||
if [ "$override" == "--override" ] ; then
|
||||
./zig-out/bin/pkghash -g --tag=$tag --template=doc/release-template.md
|
||||
else
|
||||
echo "WARNING: GIT WORKING TREE IS DIRTY!"
|
||||
echo "If you want to get zig hash anyway, run:"
|
||||
echo "./zig-out/bin/pkghash -g"
|
||||
echo "or, with full-blown release-notes:"
|
||||
echo "./zig-out/bin/pkghash -g --tag=$tag --template=doc/release-template.md"
|
||||
echo ""
|
||||
echo "To skip this message and do the pkghash thing anyway, supply the"
|
||||
echo "--override parameter"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue