|
|
|
@ -176,21 +176,27 @@ eof |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
sign-git-tag) |
|
|
|
|
if [ $# -lt 3 ] |
|
|
|
|
if [ $# -lt 2 ] |
|
|
|
|
then |
|
|
|
|
printf "usage: $0 sign-git-tag TAG AUTHTOKEN\n" |
|
|
|
|
printf "usage: $0 sign-git-tag TAG TOKEN [ARCHIVE]\n" |
|
|
|
|
printf " if ARCHIVE is not specified then it is created\n" |
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
tag="$2" |
|
|
|
|
tag="$1" |
|
|
|
|
if ! git rev-parse -q --verify "${tag}" >/dev/null 2>&1 |
|
|
|
|
then |
|
|
|
|
printf "Tag \"${tag}\" not found.\n" |
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
token="$3" |
|
|
|
|
archivename="cdist-${tag}.tar.gz" |
|
|
|
|
git archive --prefix="cdist-${tag}" -o "${archivename}" "${tag}" \ |
|
|
|
|
|| exit 1 |
|
|
|
|
token="$2" |
|
|
|
|
if [ $# -ge 2 ] |
|
|
|
|
then |
|
|
|
|
archivename="$3" |
|
|
|
|
else |
|
|
|
|
archivename="cdist-${tag}.tar.gz" |
|
|
|
|
git archive --prefix="cdist-${tag}" -o "${archivename}" "${tag}" \ |
|
|
|
|
|| exit 1 |
|
|
|
|
fi |
|
|
|
|
gpg --armor --detach-sign "${archivename}" || exit 1 |
|
|
|
|
|
|
|
|
|
# make github release |
|
|
|
@ -217,7 +223,11 @@ eof |
|
|
|
|
|| exit 1 |
|
|
|
|
|
|
|
|
|
# remove generated files (archive and asc) |
|
|
|
|
rm -f "${archivename}" "${archivename}.asc" |
|
|
|
|
if [ $# -ge 2] |
|
|
|
|
then |
|
|
|
|
rm -f "${archivename}" |
|
|
|
|
fi |
|
|
|
|
rm -f "${archivename}.asc" |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
release) |
|
|
|
|