From 4836216a9b779fde432ec4138a1bfef610bc9042 Mon Sep 17 00:00:00 2001 From: Piper McCorkle Date: Tue, 22 Mar 2022 13:55:32 -0500 Subject: [PATCH] TUN-5895 run brew bump-formula-pr on release --- .teamcity/update-homebrew-core.sh | 23 +++++++++++++++++++++++ cfsetup.yaml | 2 ++ 2 files changed, 25 insertions(+) create mode 100755 .teamcity/update-homebrew-core.sh diff --git a/.teamcity/update-homebrew-core.sh b/.teamcity/update-homebrew-core.sh new file mode 100755 index 00000000..4a40a47d --- /dev/null +++ b/.teamcity/update-homebrew-core.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -euo pipefail + +if ! VERSION="$(git describe --tags --exact-match 2>/dev/null)" ; then + echo "Skipping public release for an untagged commit." + echo "##teamcity[buildStatus status='SUCCESS' text='Skipped due to lack of tag']" + exit 0 +fi + +if [[ "${HOMEBREW_GITHUB_API_TOKEN:-}" == "" ]] ; then + echo "Missing GITHUB_API_TOKEN" + exit 1 +fi + +# "install" Homebrew +git clone https://github.com/Homebrew/brew tmp/homebrew +eval "$(tmp/homebrew/bin/brew shellenv)" +brew update --force --quiet +chmod -R go-w "$(brew --prefix)/share/zsh" + +# bump formula pr +brew bump-formula-pr cloudflared diff --git a/cfsetup.yaml b/cfsetup.yaml index 39aa09a5..5180efa4 100644 --- a/cfsetup.yaml +++ b/cfsetup.yaml @@ -192,8 +192,10 @@ stretch: &stretch builddeps: - openssh-client - s3cmd + - jq post-cache: - .teamcity/update-homebrew.sh + - .teamcity/update-homebrew-core.sh github-message-release: build_dir: *build_dir builddeps: