Skip to content

Commit

Permalink
Cache deb package of goreleaser since binary is installed with sudo
Browse files Browse the repository at this point in the history
Restore cache command requires permissions to the path the binary is
installed. This is a simple approach to fix that by only caching the pkg.

Also bumped cache key for goreleaser to affect this change
  • Loading branch information
Zachary Scott committed Jun 13, 2018
1 parent 108a94e commit 643b3cf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@ jobs:
steps:
- checkout
- restore_cache:
keys: [v1-goreleaser-]
keys: [v2-goreleaser-]
- run:
name: Install GoReleaser
command: |
[[ -e goreleaser ]] && exit
curl --silent --location --fail --retry 3 $GORELEASER_URL > /tmp/goreleaser_amd64.deb
sudo apt install /tmp/goreleaser_amd64.deb
[ -f ~/goreleaser_amd64.db ] || curl --silent --location --fail --retry 3 $GORELEASER_URL > ~/goreleaser_amd64.deb
sudo apt install ~/goreleaser_amd64.deb
- run:
name: Tag Repo
command: |
Expand All @@ -96,5 +95,5 @@ jobs:
name: Release
command: goreleaser
- save_cache:
key: v1-goreleaser-{{ checksum "/usr/local/bin/goreleaser" }}
paths: [/usr/local/bin/goreleaser]
key: v2-goreleaser-{{ checksum "~/goreleaser_amd64.deb" }}
paths: [~/goreleaser_amd64.deb]

0 comments on commit 643b3cf

Please sign in to comment.