Skip to content

Commit 01cf8e7

Browse files
committed
feat: rename pact-broker to broker, rename cli binary to pact
1 parent fcf38bc commit 01cf8e7

19 files changed

Lines changed: 167 additions & 169 deletions

.github/workflows/cli.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ jobs:
3232

3333
- name: Show help commands
3434
run: |
35-
pact-cli --help
36-
pact-cli pactflow --help
35+
pact --help
3736
38-
- name: Run pact-broker commands
37+
- name: Run pactbroker commands
3938
shell: bash
4039
run: ./run.sh
4140
env:

.github/workflows/reusable-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ jobs:
8383
shell: bash
8484
env:
8585
PACT_BROKER_BASE_URL: http://localhost:9292
86-
BIN: target/${{ inputs.target }}/release/pact-cli
86+
BIN: target/${{ inputs.target }}/release/pact
8787
- name: test pact-cli with locally running Pact Broker (Windows)
8888
if: ${{ runner.os == 'Windows' && inputs.target != 'aarch64-pc-windows-msvc' }}
8989
run: ./run.ps1
9090
shell: pwsh
9191
env:
9292
PACT_BROKER_BASE_URL: http://localhost:9292
93-
BIN: target/${{ inputs.target }}/release/pact-cli.exe
93+
BIN: target/${{ inputs.target }}/release/pact.exe
9494
- name: Create dist
9595
id: dist
9696
shell: bash

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ indexmap = { version = "1.9.3", features = ["std"] }
6868

6969

7070
# [lib]
71-
# name = "pact-cli" # Name of the library
71+
# name = "pact" # Name of the library
7272
# crate-type = ["cdylib", "staticlib"] # For compiling to a shared library
7373

7474
[[bin]]
75-
name = "pact-cli"
75+
name = "pact"
7676
path = "src/bin.rs"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SHELL := /bin/bash
44

55
TARGET=
66
USE_CROSS=
7-
BINARY_NAME?=pact-cli
7+
BINARY_NAME?=pact
88
SLIM=false
99
BUILDER=cargo
1010

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ Example
9191

9292
- name: Show help commands
9393
run: |
94-
pact-cli --help
95-
pact-cli pactflow --help
94+
pact --help
9695
```
9796
9897
### Docker
@@ -116,13 +115,13 @@ tags format
116115
### All commands
117116

118117
```console
119-
$ pact-cli --help
118+
$ pact --help
120119
Pact consolidated CLI - pact_core_mock_server, pact_verifier, pact-stub-server, pact-plugin-cli, pact-broker-cli in a single binary
121120
122-
Usage: pact-cli [OPTIONS] [COMMAND]
121+
Usage: pact [OPTIONS] [COMMAND]
123122
124123
Commands:
125-
pact-broker A Rust and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.
124+
broker A Rust and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.
126125
pactflow PactFlow specific commands
127126
completions Generates completion scripts for your shell
128127
plugin CLI utility for Pact plugins
@@ -137,13 +136,13 @@ Options:
137136
138137
```
139138

140-
### `pact-broker`
139+
### `broker`
141140

142141
```console
143-
$ pact-cli pact-broker --help
142+
$ pact broker --help
144143
A Rust and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.
145144
146-
Usage: pact-cli pact-broker [OPTIONS] [COMMAND]
145+
Usage: pact broker [OPTIONS] [COMMAND]
147146
148147
Commands:
149148
publish Publishes pacts to the Pact Broker
@@ -185,10 +184,10 @@ Options:
185184
### `pactflow`
186185

187186
```console
188-
$ pact-cli pactflow --help
187+
$ pact pactflow --help
189188
PactFlow specific commands
190189
191-
Usage: pact-cli pactflow [OPTIONS] [COMMAND]
190+
Usage: pact pactflow [OPTIONS] [COMMAND]
192191
193192
Commands:
194193
publish-provider-contract Publish provider contract to PactFlow
@@ -203,10 +202,10 @@ Options:
203202
### `plugin`
204203

205204
```console
206-
$ pact-cli plugin --help
205+
$ pact plugin --help
207206
CLI utility for Pact plugins
208207
209-
Usage: pact-cli plugin [OPTIONS] <COMMAND>
208+
Usage: pact plugin [OPTIONS] <COMMAND>
210209
211210
Commands:
212211
list List installed or available plugins
@@ -231,10 +230,10 @@ Options:
231230
### `mock`
232231

233232
```console
234-
$ pact-cli mock --help
233+
$ pact mock --help
235234
Standalone Pact mock server
236235
237-
Usage: pact-cli mock [OPTIONS] [COMMAND]
236+
Usage: pact mock [OPTIONS] [COMMAND]
238237
239238
Commands:
240239
start Starts the master mock server
@@ -260,10 +259,10 @@ Options:
260259
### `verifier`
261260

262261
```console
263-
$ pact-cli verifier --help
262+
$ pact verifier --help
264263
Standalone pact verifier for provider pact verification
265264
266-
Usage: pact-cli verifier [OPTIONS]
265+
Usage: pact verifier [OPTIONS]
267266
268267
Options:
269268
--help Print help and exit
@@ -367,10 +366,10 @@ Development options:
367366
### `stub`
368367

369368
```console
370-
$ pact-cli stub --help
369+
$ pact stub --help
371370
Pact Stub Server 0.6.3
372371
373-
Usage: pact-cli stub [OPTIONS]
372+
Usage: pact stub [OPTIONS]
374373
375374
Options:
376375
-l, --loglevel <loglevel>

cbindgen.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ prefix_with_name = true
6666
# [parse.expand]
6767

6868
# # Expand macros for `pact_matching_ffi`.
69-
# crates = ["pact-cli_ffi"]
69+
# crates = ["pact_cli_ffi"]

docker/Dockerfile.alpine

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ ARG VERSION=0.0.9
77

88
RUN if [ "$TARGETARCH" = "amd64" ]; then \
99
BIN_ARCH="x86_64"; \
10-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musl; \
10+
BIN_FILE=pact-${BIN_ARCH}-linux-musl; \
1111
elif [ "$TARGETARCH" = "386" ] || [ "$TARGETARCH" = "586" ] || [ "$TARGETARCH" = "686" ]; then \
1212
BIN_ARCH="i686"; \
13-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musl; \
13+
BIN_FILE=pact-${BIN_ARCH}-linux-musl; \
1414
elif [ "$TARGETARCH" = "arm64" ]; then \
1515
BIN_ARCH="aarch64"; \
16-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musl; \
16+
BIN_FILE=pact-${BIN_ARCH}-linux-musl; \
1717
elif [ "$TARGETARCH" = "s390x" ]; then \
1818
BIN_ARCH="s390x"; \
19-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-gnu; \
19+
BIN_FILE=pact-${BIN_ARCH}-linux-gnu; \
2020
apk add --no-cache wget; \
2121
elif [ "$TARGETARCH" = "riscv64" ]; then \
2222
BIN_ARCH="riscv64gc"; \
23-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-gnu; \
23+
BIN_FILE=pact-${BIN_ARCH}-linux-gnu; \
2424
elif [ "$TARGETARCH" = "arm" ]; then \
2525
echo ${TARGETVARIANT}; \
2626
if [ "$TARGETVARIANT" = "v8" ]; then \
2727
BIN_ARCH="arm"; \
28-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabi; \
28+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabi; \
2929
elif [ "$TARGETVARIANT" = "v7" ]; then \
3030
BIN_ARCH="armv7"; \
31-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabi; \
31+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabi; \
3232
elif [ "$TARGETVARIANT" = "v6" ]; then \
3333
BIN_ARCH="arm"; \
34-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabihf; \
34+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabihf; \
3535
elif [ "$TARGETVARIANT" = "v5" ]; then \
3636
BIN_ARCH="armv5te"; \
37-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabi; \
37+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabi; \
3838
else \
3939
echo "Invalid TARGETVARIANT: ${TARGETVARIANT}"; \
4040
exit 1; \
@@ -43,12 +43,12 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
4343
echo "Invalid TARGETARCH: ${TARGETARCH}"; \
4444
exit 1; \
4545
fi \
46-
&& wget -O pact-cli https://github.com/you54f/pact-cli/releases/download/v${VERSION}/${BIN_FILE} && \
47-
chmod +x pact-cli
46+
&& wget -O pact https://github.com/you54f/pact/releases/download/v${VERSION}/${BIN_FILE} && \
47+
chmod +x pact
4848

4949
FROM --platform=linux/${TARGETARCH}${TARGETVARIANT:+/${TARGETVARIANT}} ${BASE_IMAGE}
5050
WORKDIR /app
51-
COPY --from=builder /pact-cli /app/
51+
COPY --from=builder /pact /app/
5252
EXPOSE 8080
53-
ENTRYPOINT ["./pact-cli"]
53+
ENTRYPOINT ["./pact"]
5454
CMD ["--help"]

docker/Dockerfile.debian

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@ ARG VERSION=0.0.9
88
RUN apt-get update && apt-get install -y wget
99
RUN if [ "$TARGETARCH" = "amd64" ]; then \
1010
BIN_ARCH="x86_64"; \
11-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musl; \
11+
BIN_FILE=pact-${BIN_ARCH}-linux-musl; \
1212
elif [ "$TARGETARCH" = "386" ] || [ "$TARGETARCH" = "586" ] || [ "$TARGETARCH" = "686" ]; then \
1313
BIN_ARCH="i686"; \
14-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musl; \
14+
BIN_FILE=pact-${BIN_ARCH}-linux-musl; \
1515
elif [ "$TARGETARCH" = "arm64" ]; then \
1616
BIN_ARCH="aarch64"; \
17-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musl; \
17+
BIN_FILE=pact-${BIN_ARCH}-linux-musl; \
1818
elif [ "$TARGETARCH" = "s390x" ]; then \
1919
BIN_ARCH="s390x"; \
20-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-gnu; \
20+
BIN_FILE=pact-${BIN_ARCH}-linux-gnu; \
2121
elif [ "$TARGETARCH" = "riscv64" ]; then \
2222
BIN_ARCH="riscv64gc"; \
23-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-gnu; \
23+
BIN_FILE=pact-${BIN_ARCH}-linux-gnu; \
2424
elif [ "$TARGETARCH" = "arm" ]; then \
2525
echo ${TARGETVARIANT}; \
2626
if [ "$TARGETVARIANT" = "v8" ]; then \
2727
BIN_ARCH="arm"; \
28-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabi; \
28+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabi; \
2929
elif [ "$TARGETVARIANT" = "v7" ]; then \
3030
BIN_ARCH="armv7"; \
31-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabi; \
31+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabi; \
3232
elif [ "$TARGETVARIANT" = "v6" ]; then \
3333
BIN_ARCH="arm"; \
34-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabihf; \
34+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabihf; \
3535
elif [ "$TARGETVARIANT" = "v5" ]; then \
3636
BIN_ARCH="armv5te"; \
37-
BIN_FILE=pact-cli-${BIN_ARCH}-linux-musleabi; \
37+
BIN_FILE=pact-${BIN_ARCH}-linux-musleabi; \
3838
else \
3939
echo "Invalid TARGETVARIANT: ${TARGETVARIANT}"; \
4040
exit 1; \
@@ -43,12 +43,12 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
4343
echo "Invalid TARGETARCH: ${TARGETARCH}"; \
4444
exit 1; \
4545
fi \
46-
&& wget -O pact-cli https://github.com/you54f/pact-cli/releases/download/v${VERSION}/${BIN_FILE} && \
47-
chmod +x pact-cli
46+
&& wget -O pact https://github.com/you54f/pact-cli/releases/download/v${VERSION}/${BIN_FILE} && \
47+
chmod +x pact
4848

4949
FROM --platform=linux/${TARGETARCH}${TARGETVARIANT:+/${TARGETVARIANT}} ${BASE_IMAGE}
5050
WORKDIR /app
51-
COPY --from=builder /pact-cli /app/
51+
COPY --from=builder /pact /app/
5252
EXPOSE 8080
53-
ENTRYPOINT ["./pact-cli"]
53+
ENTRYPOINT ["./pact"]
5454
CMD ["--help"]

docker/NOTES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
build a single arch image
33

44
```sh
5-
docker buildx build -t you54f/pact-cli:$DOCKER_TAG-alpine --build-arg VERSION=$DOCKER_TAG --platform linux/arm . -f Dockerfile.alpine --load
5+
docker buildx build -t you54f/pact:$DOCKER_TAG-alpine --build-arg VERSION=$DOCKER_TAG --platform linux/arm . -f Dockerfile.alpine --load
66
```
77

88
Run the image
99

1010
```sh
11-
docker run --platform=linux/arm -p 8080:8080 --rm --init you54f/pact-cli:0.0.9-alpine mock start
11+
docker run --platform=linux/arm -p 8080:8080 --rm --init you54f/pact:0.0.9-alpine mock start
1212
```
1313

1414
Docker multi arch available args

docker/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To build a single architecture docker image (change the version as required):
44

55
```shell
6-
> docker build -t pactfoundation/pact-cli:0.6.0 --build-arg VERSION=0.6.0 .
6+
> docker build -t pactfoundation/pact:0.6.0 --build-arg VERSION=0.6.0 .
77
```
88

99
To build a multi-architecture docker image:
@@ -20,14 +20,14 @@ Build images
2020

2121
```shell
2222
export DOCKER_TAG=0.6.0
23-
docker buildx build -t you54f/pact-cli:$DOCKER_TAG --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 .
24-
docker buildx build -t you54f/pact-cli:latest --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 .
23+
docker buildx build -t you54f/pact:$DOCKER_TAG --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 .
24+
docker buildx build -t you54f/pact:latest --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 .
2525
```
2626

2727
Build & Push images - will use cached images if available
2828

2929
```shell
3030
export DOCKER_TAG=0.6.0
31-
docker buildx build -t you54f/pact-cli:$DOCKER_TAG --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 --push .
32-
docker buildx build -t you54f/pact-cli:latest --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 --push .
31+
docker buildx build -t you54f/pact:$DOCKER_TAG --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 --push .
32+
docker buildx build -t you54f/pact:latest --build-arg VERSION=$DOCKER_TAG --platform linux/amd64,linux/arm64 --push .
3333
```

0 commit comments

Comments
 (0)