Add support for git tags when publishing.

#220
This commit is contained in:
Ahmed Charles 2018-02-07 14:38:35 +00:00
parent d52976e208
commit d2f1d951bb

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# A script to bump the version number on all Cargo.toml files etc in
# an atomic fashion.
@ -19,6 +19,7 @@ fi
echo "Found consistent version $VERSION"
BASE_DIR="$PWD"
TMPDIR=${TMPDIR:-"/tmp"}
function publish_fail {
printf "ERROR\n"
@ -39,6 +40,9 @@ publish lalrpop-util
publish lalrpop-snap
publish lalrpop
git tag $VERSION
git push origin tag $VERSION
printf "Updated version in docs etc..."
perl -p -i -e 's/^version = "[0-9.]+"$/version = "'$VERSION'"/' \
doc/*/Cargo.toml \