release.sh: keep tags updated
parent
b4076261a4
commit
9d69515d19
11
release.sh
11
release.sh
|
@ -6,7 +6,7 @@ die () {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
for command in help2man cargo-release; do
|
for command in help2man cargo-release sed; do
|
||||||
if ! command -v $command &> /dev/null
|
if ! command -v $command &> /dev/null
|
||||||
then
|
then
|
||||||
echo "$command binary could not be found"
|
echo "$command binary could not be found"
|
||||||
|
@ -17,6 +17,8 @@ done
|
||||||
[ "$#" -eq 1 ] || die "usage: ./release.sh [patch|major|minor|rc]"
|
[ "$#" -eq 1 ] || die "usage: ./release.sh [patch|major|minor|rc]"
|
||||||
git diff --quiet || die 'ERROR: git repo is dirty.'
|
git diff --quiet || die 'ERROR: git repo is dirty.'
|
||||||
|
|
||||||
|
OLD_VERSION="v$(cargo pkgid -p shared | cut -d '#' -f 2)"
|
||||||
|
|
||||||
cargo release "$1" --no-confirm --exclude "hostsfile" --exclude "publicip"
|
cargo release "$1" --no-confirm --exclude "hostsfile" --exclude "publicip"
|
||||||
|
|
||||||
# re-stage the manpage commit and the cargo-release commit
|
# re-stage the manpage commit and the cargo-release commit
|
||||||
|
@ -30,8 +32,9 @@ for binary in "innernet" "innernet-server"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
git add doc
|
git add doc
|
||||||
|
perl -pi -e "s/$OLD_VERSION/$VERSION/g" README.md
|
||||||
|
|
||||||
VERSION="$(cargo pkgid -p shared | cut -d '#' -f 2)"
|
VERSION="v$(cargo pkgid -p shared | cut -d '#' -f 2)"
|
||||||
|
|
||||||
git commit -m "meta: release v$VERSION"
|
git commit -m "meta: release $VERSION"
|
||||||
git tag -a "v$VERSION" -m "release v$VERSION"
|
git tag -a "$VERSION" -m "release $VERSION"
|
||||||
|
|
Loading…
Reference in New Issue