File tree 2 files changed +30
-0
lines changed 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ before_script:
27
27
- " ${PULUMI_SCRIPTS}/ci/ensure-dependencies"
28
28
script :
29
29
- make travis_${TRAVIS_EVENT_TYPE}
30
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./scripts/update_homebrew.sh; fi
30
31
after_failure :
31
32
- " ${PULUMI_SCRIPTS}/ci/upload-failed-tests"
32
33
notifications :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # update_homebrew.sh uses `brew bump-formula-pr` to update the formula for the Pulumi CLI and SDKs
3
+ set -o nounset
4
+ set -o errexit
5
+ set -o pipefail
6
+ readonly ROOT=$( dirname " ${0} " ) /..
7
+
8
+ if [[ " ${TRAVIS:- } " != " true" ]]; then
9
+ echo " error: this script should be run from within Travis"
10
+ exit 1
11
+ fi
12
+
13
+ if [[ -z " ${PULUMI_BOT_GITHUB_API_TOKEN:- } " ]]; then
14
+ echo " error: PULUMI_BOT_GITHUB_API_TOKEN must be set"
15
+ exit 1
16
+ fi
17
+
18
+ if ! echo " ${TRAVIS_TAG:- } " | grep -q -e " ^v[0-9]\+\.[0-9]\+\.[0-9]\+$" ; then
19
+ echo " Skipping Homebrew formula update; ${TRAVIS_TAG:- } does not denote a released version"
20
+ exit 0
21
+ fi
22
+
23
+ if [[ " ${TRAVIS_OS_NAME:- } " != " osx" ]]; then
24
+ echo " Skipping Homebrew formula updte; not running on OS X"
25
+ exit 0
26
+ fi
27
+
28
+ HOMEBREW_GITHUB_API_TOKEN=" ${PULUMI_BOT_GITHUB_API_TOKEN:- } " brew bump-formula-pr --tag=" ${TRAVIS_TAG:- } " --revision=" ${TRAVIS_COMMIT:- } " pulumi
29
+ exit 0
You can’t perform that action at this time.
0 commit comments