Skip to content

Commit

Permalink
Release v3.70.1 (#93)
Browse files Browse the repository at this point in the history
* second script

* second

* Update version to 3.70.1
  • Loading branch information
oliversun9 authored Nov 8, 2023
1 parent 7e95e1e commit cedba97
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [Unreleased]
## [v3.70.1] - 2023-11-08

- No changes yet.

Expand Down Expand Up @@ -1069,7 +1069,7 @@ buf check breaking proto --against .git#branch=master,subdir=proto

Initial beta release.

[Unreleased]: https://github.com/bufbuild/buf/compare/v3.20.0...HEAD
[v3.70.1]: https://github.com/bufbuild/buf/compare/v3.20.0...v3.70.1
[v3.20.0]: https://github.com/bufbuild/buf/compare/v3.10.1...v3.20.0
[v3.10.1]: https://github.com/bufbuild/buf/compare/v3.10.0...v3.10.1
[v3.10.0]: https://github.com/bufbuild/buf/compare/v3.9.0...v3.10.0
Expand Down
53 changes: 53 additions & 0 deletions make/buf/scripts/backtodevelopment.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash

set -euo pipefail

DIR="$(CDPATH= cd "$(dirname "${0}")/../../.." && pwd)"
cd "${DIR}"

# We already have set -u, but want to fail early if a required variable is not set.
# : ${GH_TOKEN}
# : ${WEBHOOK_URL}

RELEASED_VERSION_LINE=$(grep -oE 'Version.*=.*\"[0-9]\.[0-9]+\.[0-9]+[^\"]*' private/buf/bufcli/bufcli.go)
RELEASED_VERSION=${RELEASED_VERSION_LINE##Version*=*\"}
# echo "released version is ${RELEASED_VERSION}"
NEXT_VERSION=$(awk -F. -v OFS=. '{$NF += 1 ; print}' <<< ${RELEASED_VERSION})
NEXT_VERSION="${NEXT_VERSION}-dev"

make updateversion VERSION=${NEXT_VERSION}

if [[ "${OSTYPE}" == "linux-gnu"* ]]; then
SED_BIN=sed
elif [[ "${OSTYPE}" == "darwin"* ]]; then
SED_BIN=gsed
else
echo "unsupported OSTYPE: ${OSTYPE}"
exit 1
fi

${SED_BIN} -i "/^# Changelog/ {
N;
a\
## [Unreleased]\\
\\
- No changes yet.\\
}" CHANGELOG.md

${SED_BIN} -i "/^Initial beta release.$/ {
N;
a\
[Unreleased]: https://github.com/bufbuild/buf/compare/v${RELEASED_VERSION}...HEAD
}" CHANGELOG.md

BRANCH="next/v${RELEASED_VERSION}"
git switch -C ${BRANCH}
git add .
git commit -m "Back to development"
git push --set-upstream origin --force ${BRANCH}
# This requires GH_TOKEN.
url=$(gh pr create --title "Return to Development" --body "Release complete for v${RELEASED_VERSION}"
# jq --null-input "{ text: "BufCLI Release for v${VERSION} has been drafted: ${url}" }" \
# curl -sSL -X POST -H "Content-Type: application/json" -d @- "${WEBHOOK_URL}"
6 changes: 3 additions & 3 deletions make/buf/scripts/releasechangelogandversion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ fi
make updateversion
make releasechangelog

branch="release/v${VERSION}"
git switch -C ${branch}
BRANCH="release/v${VERSION}"
git switch -C ${BRANCH}
git add .
git commit -m "Update version to ${VERSION}"
git push --set-upstream origin --force ${branch}
git push --set-upstream origin --force ${BRANCH}
# This requires GH_TOKEN.
url=$(gh pr create --title "Release v${VERSION}" --body "Release prepared for ${VERSION}
Reminder: Verify the changelog")
Expand Down
2 changes: 1 addition & 1 deletion private/buf/bufcli/bufcli.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import (

const (
// Version is the CLI version of buf.
Version = "3.20.1-dev"
Version = "3.70.1"

inputHTTPSUsernameEnvKey = "BUF_INPUT_HTTPS_USERNAME"
inputHTTPSPasswordEnvKey = "BUF_INPUT_HTTPS_PASSWORD"
Expand Down

0 comments on commit cedba97

Please sign in to comment.