Skip to content

Commit 5df83d2

Browse files
authored
prevent caching on brew sync (#31)
1 parent c446a12 commit 5df83d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +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
53+
- stage: Sync to Homebrew
5454
if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(GITHUB_USERNAME) IS present
5555
script: make homebrew-sync
5656
name: Sync to AWS homebrew-tap

scripts/sync-to-aws-homebrew-tap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ for os_arch in "${PLATFORMS[@]}"; do
136136
asset_file="${BINARY_BASE}-${os}-${arch}.tar.gz"
137137
asset_file_path="${DOWNLOAD_DIR}/${asset_file}"
138138

139-
curl -Lo "${asset_file_path}" "${asset_url}"
139+
curl -H 'Cache-Control: no-cache' -Lo "${asset_file_path}" "${asset_url}?$(date +%s)"
140140

141141
asset_file_size=$(du -k "${asset_file_path}" | cut -f1)
142142
if [[ "${asset_file_size}" -lt 100 ]]; then
@@ -184,7 +184,7 @@ if [[ "${DRY_RUN}" -eq 0 ]]; then
184184
cd "${SYNC_DIR}"
185185
gh repo fork $TAP_REPO --clone --remote
186186
cd "${FORK_DIR}"
187-
git remote set-url origin https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${TAP_REPO}.git
187+
git remote set-url origin https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${GITHUB_USERNAME}/${TAP_NAME}.git
188188
DEFAULT_BRANCH=$(git rev-parse --abbrev-ref HEAD | tr -d '\n')
189189

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

0 commit comments

Comments
 (0)