Skip to content

Commit c446a12

Browse files
authored
sync to homebrew tap on release (#30)
1 parent 902cdb0 commit c446a12

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ jobs:
5050
if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(DOCKERHUB_USERNAME) IS present
5151
script: make release
5252
name: Release Assets
53+
- stage: Deploy
54+
if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(GITHUB_USERNAME) IS present
55+
script: make homebrew-sync
56+
name: Sync to AWS homebrew-tap

scripts/sync-to-aws-homebrew-tap

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,13 @@ if [[ "${DRY_RUN}" -eq 0 ]]; then
189189

190190
cp "${BREW_CONFIG_DIR}/${BINARY_BASE}.json" "${FORK_DIR}/bottle-configs/${BINARY_BASE}.json"
191191

192-
## best effort sync of fork
193-
git pull upstream ${DEFAULT_BRANCH} || :
194-
git push -u origin ${DEFAULT_BRANCH} || :
195-
196-
git checkout -b "${BINARY_BASE}-${VERSION}"
192+
git checkout -b "${BINARY_BASE}-${VERSION}" upstream/${DEFAULT_BRANCH}
197193
git add "bottle-configs/${BINARY_BASE}.json"
198194
git commit -m "${BINARY_BASE} update to version ${VERSION_NUM}"
199195

200196
git push -u origin "${BINARY_BASE}-${VERSION}"
201-
gh pr create --fill
197+
gh pr create --title "🥳 ${BINARY_BASE} ${VERSION} Automated Release! 🥑" \
198+
--body "## ${BINARY_BASE} ${VERSION} Automated Release! 🤖🤖"
202199
fi
203200

204201
echo "✅ Homebrew sync complete"

0 commit comments

Comments
 (0)