Improve release and publish scripts

This commit is contained in:
Christian Hohnstaedt 2018-05-08 22:55:53 +02:00
parent 2a94b3aab5
commit c1c3c43c46
2 changed files with 26 additions and 4 deletions

View File

@ -12,14 +12,15 @@ releasedir="$HOME/xca-$TVERSION"
./misc/gen-binary-hash "$releasedir"
echo "$TVERSION""+" > VERSION
git commit -a -m "Release $TVERSION done"
git commit -a -m "Release XCA $TVERSION done"
./github.release.py "$TVERSION" "${releasedir}/"*"xca-$TVERSION".*
./github.release.py "$TVERSION" "${releasedir}/"*"xca-$TVERSION"*
cat << EOF
After verifying the commits, tags and github release,
finally do:
git push origin --tags master
scp ${releasedir}/doc/* hohnstaedt.de:xca-doc/
Un-draft the release on github
EOF

View File

@ -20,9 +20,30 @@ if ! git diff-index --quiet HEAD --; then
exit 1
fi
! git grep -q "^xca $TVERSION " changelog
! git grep -q "$TVERSION" VERSION
lasttag=$(git describe --abbrev=0 HEAD)
unset unchanged
for i in changelog doc/xca.sgml README.md; do
if ! git diff --quiet "$lasttag" -- $i; then
echo "File $i untouched since $lasttag"
unchanged="x"
fi
done
if test -n "$unchanged"; then
echo "Are you sure to not change the file(s) above?"
read a
fi
x=$(git grep "^xca $TVERSION " changelog ||
git grep "$TVERSION" VERSION || :)
if test -n "$x"; then
echo "$x"
echo Release $TVERSIO already exists
exit 1
fi
exit 0
echo "$TVERSION" > VERSION
(
LANG=C date +"xca $TVERSION %a %b %d %Y"