Skip to content

Commit

Permalink
scripts: add brew bump-formula-pr to the release process (#5273)
Browse files Browse the repository at this point in the history
clean up release scripts a bit
  • Loading branch information
nicks committed Dec 10, 2021
1 parent 4619ce7 commit a71350c
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 42 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ ci-integration-container:
clean:
go clean -cache -testcache -r -i ./...

release:
./scripts/release.sh

prettier:
cd web && yarn install
cd web && yarn prettier
Expand Down
1 change: 1 addition & 0 deletions scripts/release-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ VERSION=$(git describe --abbrev=0 --tags)
./scripts/release-update-tilt-repo.sh "$VERSION"
./scripts/release-update-tilt-docs-repo.sh "$VERSION"
./scripts/record-release.sh "$VERSION"
./scripts/release-update-homebrew-core.sh "$VERSION"
27 changes: 27 additions & 0 deletions scripts/release-update-homebrew-core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
#
# Updates the Tilt repo with the latest version info.
#
# Usage:
# scripts/release-update-homebrew-core.sh $VERSION
# where VERSION is of the form v0.1.0

set -euo pipefail

if [[ "${GITHUB_TOKEN-}" == "" ]]; then
echo "Missing GITHUB_TOKEN"
exit 1
fi

VERSION=${1//v/}
VERSION_PATTERN="^[0-9]+\\.[0-9]+\\.[0-9]+$"
if ! [[ $VERSION =~ $VERSION_PATTERN ]]; then
echo "Version did not match expected pattern. Actual: $VERSION"
exit 1
fi

git config --global user.email "it@tilt.dev"
git config --global user.name "Tilt Dev"

# send the brew team a PR to upgrade homebrew-core
brew bump-formula-pr --version="$VERSION" tilt
2 changes: 1 addition & 1 deletion scripts/release-update-tilt-docs-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sed -i -E "s|/download/v$SED_VERSION_PATTERN/tilt.$SED_VERSION_PATTERN|/download
sed -i -E "s|/download/v$SED_VERSION_PATTERN/tilt.$SED_VERSION_PATTERN|/download/v$VERSION/tilt.$VERSION|" docs/upgrade.md
git add .

git config --global user.email "hi@tilt.dev"
git config --global user.email "it@tilt.dev"
git config --global user.name "Tilt Dev"
git commit -a -m "Update docs to Tilt version: $VERSION"
git push origin master
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-update-tilt-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Updates the Tilt repo with the latest version info.
#
# Usage:
# scripts/update-tilt-repo.sh $VERSION
# where VERSION is of the form 0.1.0
# scripts/release-update-tilt-repo.sh $VERSION
# where VERSION is of the form v0.1.0

set -euo pipefail

Expand Down Expand Up @@ -32,7 +32,7 @@ sed -i -E "s/version = \".*\"/version = \"$VERSION\"/" scripts/install.ps1
sed -i -E "s/VERSION=\".*\"/VERSION=\"$VERSION\"/" scripts/install.sh
sed -i -E "s/devVersion = \".*\"/devVersion = \"$VERSION\"/" internal/cli/build.go
git add .
git config --global user.email "hi@tilt.dev"
git config --global user.email "it@tilt.dev"
git config --global user.name "Tilt Dev"
git commit -a -m "Update version numbers: $VERSION"
git push origin master
Expand Down
2 changes: 2 additions & 0 deletions scripts/release.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install yarn

RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

RUN mkdir -p ~/.windmill

ENTRYPOINT ["goreleaser"]
Expand Down
35 changes: 0 additions & 35 deletions scripts/release.sh

This file was deleted.

0 comments on commit a71350c

Please sign in to comment.