File tree Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Expand file tree Collapse file tree 2 files changed +6
-21
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,17 @@ GOARCH = $(shell go env GOARCH)
5
5
TOOLS_BIN := $(shell pwd) /.bin
6
6
7
7
OVERRIDE_GOCI_LINT_V := v1.55.2
8
- SHELL: =env PATH=$(TOOLS_BIN ) /go:$(PATH ) $(SHELL )
8
+ SHELL: =env PATH=$(TOOLS_BIN ) /go:$(TOOLS_BIN ) /pact/bin: $( PATH ) $(SHELL )
9
9
10
10
# # tools: Install required tooling.
11
11
.PHONY : tools
12
12
tools : $(TOOLS_BIN ) /golangci-lint $(TOOLS_BIN ) /go
13
13
$(TOOLS_BIN ) /golangci-lint :
14
14
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/$(OVERRIDE_GOCI_LINT_V ) /install.sh | sh -s -- -b $(TOOLS_BIN ) / $(OVERRIDE_GOCI_LINT_V )
15
15
16
+ $(TOOLS_BIN ) /pact-broker :
17
+ @cd $(TOOLS_BIN ) ; curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-ruby-standalone/master/install.sh | PACT_CLI_VERSION=v2.4.4 bash; cd ../
18
+
16
19
$(TOOLS_BIN ) /go :
17
20
mkdir -p ${TOOLS_BIN} /go
18
21
@cat tools.go | grep _ | awk -F' "' ' {print $$2}' | xargs -tI % sh -c ' GOBIN=${TOOLS_BIN}/go go install %'
@@ -64,7 +67,7 @@ contract-test: $(TOOLS_BIN)
64
67
@go test -tags=contract ./...
65
68
66
69
.PHONY : publish-contract
67
- publish-contract :
70
+ publish-contract : $( TOOLS_BIN ) /pact-broker
68
71
./scripts/publish-contract.sh
69
72
70
73
.PHONY : generate
Original file line number Diff line number Diff line change 14
14
gitCommitSHA=$( git rev-parse HEAD)
15
15
gitBranch=$( git rev-parse --abbrev-ref HEAD)
16
16
17
- # docker run -v $(pwd)/internal/workspace/2024-05-14/pacts/code-client-go-workspace-service.json:/code-client-go-workspace-service.json --rm \
18
- # -e PACT_BROKER_BASE_URL \
19
- # -e PACT_BROKER_TOKEN \
20
- # pactfoundation/pact-cli:latest \
21
- # publish \
22
- # /code-client-go-workspace-service.json \
23
- # --branch="$gitBranch" \
24
- # --consumer-app-version "$gitCommitSHA"
25
-
26
- docker run --rm \
27
- -w ${PWD} \
28
- -v ${PWD} :${PWD} \
29
- -e PACT_BROKER_BASE_URL \
30
- -e PACT_BROKER_TOKEN \
31
- pactfoundation/pact-cli:latest \
32
- publish \
33
- ${PWD} /internal/workspace/2024-05-14/pacts/code-client-go-workspace-service.json \
34
- --branch=" $gitBranch " \
35
- --consumer-app-version " $gitCommitSHA "
17
+ pact-broker publish ./internal/workspace/2024-05-14/pacts/code-client-go-workspace-service.json --consumer-app-version " $gitCommitSHA " --branch=" $gitBranch "
You can’t perform that action at this time.
0 commit comments