From b7b50d0156f714a082c5232bd4b84cb27ddae5bd Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Thu, 16 Sep 2021 01:33:38 +0900 Subject: [PATCH] release.sh: make sure wireguard-control-sys version is synced --- release.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/release.sh b/release.sh index a011f1c..b3bd9e4 100755 --- a/release.sh +++ b/release.sh @@ -17,7 +17,7 @@ done [ "$#" -eq 1 ] || die "usage: ./release.sh [patch|major|minor|rc]" git diff --quiet || die 'ERROR: git repo is dirty.' -OLD_VERSION="v$(cargo pkgid -p shared | cut -d '#' -f 2)" +OLD_VERSION="$(cargo pkgid -p shared | cut -d '#' -f 2)" cargo release "$1" --no-confirm --exclude "hostsfile" --exclude "publicip" --execute @@ -34,11 +34,13 @@ for binary in "innernet" "innernet-server"; do gzip -fk "doc/$binary.8" done -VERSION="v$(cargo pkgid -p shared | cut -d '#' -f 2)" +VERSION="$(cargo pkgid -p shared | cut -d '#' -f 2)" -perl -pi -e "s/$OLD_VERSION/$VERSION/g" README.md +perl -pi -e "s/v$OLD_VERSION/v$VERSION/g" README.md +perl -pi -e "s/$OLD_VERSION/$VERSION/g" wireguard-control/Cargo.toml git add doc git add README.md -git commit -m "meta: release $VERSION" -git tag -f -a "$VERSION" -m "release $VERSION" +git add wireguard-control/Cargo.toml +git commit -m "meta: release v$VERSION" +git tag -f -a "v$VERSION" -m "release v$VERSION"