Skip to content

Commit e4492ab

Browse files
committed
chore: add install ffi commands & drop tags
1 parent dceb302 commit e4492ab

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Makefile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ GITHUB_WEBHOOK_UUID := ""
66
PACT_CHANGED_WEBHOOK_UUID := ""
77
PACT_CLI="docker run --rm -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_TOKEN pactfoundation/pact-cli:latest"
88
export PATH := $(PWD)/pact/bin:$(PATH)
9-
9+
PACT_GO_VERSION=2.0.8
10+
PACT_DOWNLOAD_DIR=/tmp
11+
ifeq ($(OS),Windows_NT)
12+
PACT_DOWNLOAD_DIR=$$TMP
13+
endif
1014
# Only deploy from master
1115
ifeq ($(GIT_BRANCH),master)
1216
DEPLOY_TARGET=deploy
@@ -32,7 +36,7 @@ fake_ci: .env
3236
make ci
3337

3438
publish_pacts: .env
35-
@"${PACT_CLI}" publish ${PWD}/pacts --consumer-app-version ${GIT_COMMIT} --tag ${GIT_BRANCH}
39+
@"${PACT_CLI}" publish ${PWD}/pacts --consumer-app-version ${GIT_COMMIT} --branch ${GIT_BRANCH}
3640

3741
## =====================
3842
## Build/test tasks
@@ -45,12 +49,12 @@ test: .env install
4549
## Deploy tasks
4650
## =====================
4751

48-
deploy: deploy_app tag record_deployment
52+
deploy: deploy_app record_deployment
4953

5054
no_deploy:
5155
@echo "Not deploying as not on master branch"
5256

53-
can_i_deploy: .env
57+
can_i_deploy: .env install_cli
5458
@echo "can_i_deploy"
5559
@"${PACT_CLI}" broker can-i-deploy \
5660
--pacticipant ${PACTICIPANT} \
@@ -62,14 +66,7 @@ can_i_deploy: .env
6266
deploy_app:
6367
@echo "Deploying to prod"
6468

65-
tag: .env
66-
@"${PACT_CLI}" broker create-version-tag \
67-
--pacticipant ${PACTICIPANT} \
68-
--version ${GIT_COMMIT} \
69-
--auto-create-version \
70-
--tag ${GIT_BRANCH}
71-
72-
record_deployment: .env
69+
record_deployment: .env install_cli
7370
@"${PACT_CLI}" broker record-deployment --pacticipant ${PACTICIPANT} --version ${GIT_COMMIT} --environment production
7471

7572
## =====================
@@ -112,6 +109,10 @@ test_github_webhook:
112109
touch .env
113110

114111
install:
112+
go install github.com/pact-foundation/pact-go/v2@v$(PACT_GO_VERSION)
113+
pact-go -l DEBUG install --libDir $(PACT_DOWNLOAD_DIR);
114+
115+
install_cli:
115116
@if [ ! -d pact/bin ]; then\
116117
@echo "--- 🐿 Installing Pact CLI dependencies"; \
117118
curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-ruby-standalone/master/install.sh | bash -x; \

0 commit comments

Comments
 (0)