Skip to content

Commit

Permalink
release.sh: make sure wireguard-control-sys version is synced
Browse files Browse the repository at this point in the history
  • Loading branch information
mcginty committed Sep 15, 2021
1 parent 72353ed commit b7b50d0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"

0 comments on commit b7b50d0

Please sign in to comment.