Skip to content

Commit b8cb1eb

Browse files
author
Natalie Arellano
committed
Fix upgrade pack in CI
While we await resolution of buildpacks/pack#1574 this should fix the pack upgrade Signed-off-by: Natalie Arellano <[email protected]>
1 parent 7079a88 commit b8cb1eb

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
go-version: '1.x'
2424
- name: Install Dependencies
2525
run: sudo apt-get install make curl jq
26+
- name: Install pack
27+
run: |
28+
sudo add-apt-repository ppa:cncf-buildpacks/pack-cli
29+
sudo apt-get update
30+
sudo apt-get install pack-cli
2631
- name: Test
2732
run: make test
2833
env:

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ endif
7474

7575
.PHONY: upgrade-pack
7676
upgrade-pack: pack-version
77-
@echo "> Upgrading pack library version $(PACK_VERSION)"
78-
cd tools; go get github.com/buildpacks/pack@v$(PACK_VERSION)
77+
@if [ ! $(`which pack` && `pack --version | cut -d '+' -f 1` != "$(PACK_VERSION)") ]; then \
78+
echo "> Upgrading pack library version $(PACK_VERSION)"; \
79+
cd tools; go get github.com/buildpacks/pack@v$(PACK_VERSION); \
80+
fi
7981

8082
.PHONY: install-pack-cli
8183
install-pack-cli: export PACK_BIN:=$(shell which pack)

0 commit comments

Comments
 (0)