Skip to content

Commit e36e4a6

Browse files
authored
chore: update binary names (Commit-Boost#131)
1 parent b59c245 commit e36e4a6

File tree

12 files changed

+36
-41
lines changed

12 files changed

+36
-41
lines changed

.github/workflows/release.yml

+8-13
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@ jobs:
2020
x86_64-apple-darwin,
2121
aarch64-apple-darwin,
2222
]
23-
names:
24-
- binary: commit-boost
25-
publish: commit-boost-cli
26-
- binary: default-pbs
27-
publish: commit-boost-pbs
28-
- binary: signer-module
29-
publish: commit-boost-signer
23+
name: [commit-boost-cli, commit-boost-pbs, commit-boost-signer]
24+
3025
include:
3126
- target: x86_64-unknown-linux-gnu
3227
os: ubuntu-latest
@@ -64,28 +59,28 @@ jobs:
6459
uses: actions-rs/cargo@v1
6560
with:
6661
command: build
67-
args: --release --target ${{ matrix.target }} --bin ${{ matrix.names.binary }}
62+
args: --release --target ${{ matrix.target }} --bin ${{ matrix.name }}
6863
env:
6964
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: gcc
7065

7166
- name: Package binary (Unix)
7267
if: runner.os != 'Windows'
7368
run: |
7469
cd target/${{ matrix.target }}/release
75-
tar -czvf ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.names.binary }}
76-
mv ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ../../../
70+
tar -czvf ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.name }}
71+
mv ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ../../../
7772
7873
- name: Package binary (Windows)
7974
if: runner.os == 'Windows'
8075
run: |
8176
cd target/${{ matrix.target }}/release
82-
7z a ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.names.binary }}.exe
83-
move ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.zip ../../../
77+
7z a ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.name }}.exe
78+
move ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip ../../../
8479
8580
- name: Upload binary to release
8681
uses: softprops/action-gh-release@v2
8782
with:
88-
files: ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }}
83+
files: ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }}
8984
draft: true
9085
token: ${{ secrets.GITHUB_TOKEN }}
9186

benches/pbs/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ docker rm --force mev_boost_bench
9090
#### Commit-Boost
9191
You can run the provided `docker-compose` file:
9292
```bash
93-
commit-boost start --docker benches/pbs/bench.docker-compose.yml
93+
commit-boost-cli start --docker benches/pbs/bench.docker-compose.yml
9494
```
95-
or regenerate it using `commit-boost init`.
95+
or regenerate it using `commit-boost-cli init`.
9696

9797
To clean up after then benchmark, run:
9898
```bash
99-
commit-boost stop --docker benches/pbs/bench.docker-compose.yml
99+
commit-boost-cli stop --docker benches/pbs/bench.docker-compose.yml
100100
```
101101

102102
### Running the benchmark

bin/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ eyre.workspace = true
2424
color-eyre.workspace = true
2525

2626
[[bin]]
27-
name = "commit-boost"
28-
path = "commit_boost.rs"
27+
name = "commit-boost-cli"
28+
path = "cli.rs"
2929

3030
[[bin]]
31-
name = "default-pbs"
32-
path = "default_pbs.rs"
31+
name = "commit-boost-pbs"
32+
path = "pbs.rs"
3333

3434
[[bin]]
35-
name = "signer-module"
36-
path = "signer_module.rs"
35+
name = "commit-boost-signer"
36+
path = "signer.rs"

bin/commit_boost.rs bin/cli.rs

File renamed without changes.

bin/default_pbs.rs bin/pbs.rs

File renamed without changes.

bin/signer_module.rs bin/signer.rs

File renamed without changes.

config.example.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ SOME_ENV_VAR = "some_value"
132132
# - files:
133133
# - /etc/prometheus/targets.json
134134
# ```
135-
# and use the `targets.json` file generated by `commit-boost init`
135+
# and use the `targets.json` file generated by `commit-boost-cli init`
136136
prometheus_config = "./docker/prometheus.yml"
137137
# Whether to start Grafana with built-in dashboards
138138
# OPTIONAL, DEFAULT: true

crates/cli/src/docker_init.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ pub fn handle_docker_init(config_path: String, output_dir: String) -> Result<()>
474474
}
475475

476476
if envs.is_empty() {
477-
println!("Run with:\n\t`commit-boost start --docker {:?}`", compose_path);
477+
println!("Run with:\n\t`commit-boost-cli start --docker {:?}`", compose_path);
478478
} else {
479479
// write envs to .env file
480480
let envs_str = {
@@ -490,7 +490,7 @@ pub fn handle_docker_init(config_path: String, output_dir: String) -> Result<()>
490490
println!("Env file written to: {:?}", env_path);
491491

492492
println!(
493-
"Run with:\n\t`commit-boost start --docker {:?} --env {:?}`",
493+
"Run with:\n\t`commit-boost-cli start --docker {:?} --env {:?}`",
494494
compose_path, env_path
495495
);
496496
}

docker/pbs.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json
1111
RUN cargo chef cook --release --recipe-path recipe.json
1212

1313
COPY . .
14-
RUN cargo build --release --bin default-pbs
14+
RUN cargo build --release --bin commit-boost-pbs
1515

1616

1717
FROM debian:bookworm-slim AS runtime
@@ -25,8 +25,8 @@ RUN apt-get update && apt-get install -y \
2525
&& apt-get clean autoclean \
2626
&& rm -rf /var/lib/apt/lists/*
2727

28-
COPY --from=builder /app/target/release/default-pbs /usr/local/bin
29-
ENTRYPOINT ["/usr/local/bin/default-pbs"]
28+
COPY --from=builder /app/target/release/commit-boost-pbs /usr/local/bin
29+
ENTRYPOINT ["/usr/local/bin/commit-boost-pbs"]
3030

3131

3232

docker/signer.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json
1111
RUN cargo chef cook --release --recipe-path recipe.json
1212

1313
COPY . .
14-
RUN cargo build --release --bin signer-module
14+
RUN cargo build --release --bin commit-boost-signer
1515

1616

1717
FROM debian:bookworm-slim AS runtime
@@ -25,8 +25,8 @@ RUN apt-get update && apt-get install -y \
2525
&& apt-get clean autoclean \
2626
&& rm -rf /var/lib/apt/lists/*
2727

28-
COPY --from=builder /app/target/release/signer-module /usr/local/bin
29-
ENTRYPOINT ["/usr/local/bin/signer-module"]
28+
COPY --from=builder /app/target/release/commit-boost-signer /usr/local/bin
29+
ENTRYPOINT ["/usr/local/bin/commit-boost-signer"]
3030

3131

3232

docs/docs/get_started/overview.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ You will need to build the CLI to create the `docker-compose` file:
5151

5252
```bash
5353
# Build the CLI
54-
cargo build --release --bin commit-boost
54+
cargo build --release --bin commit-boost-cli
5555

5656
# Check that it works
57-
./target/release/commit-boost --version
57+
./target/release/commit-boost-cli --version
5858
```
5959

6060
and the modules as Docker images
@@ -73,10 +73,10 @@ This will create two local images called `commitboost_pbs_default` and `commitbo
7373
Alternatively, you can also build the modules from source and run them without Docker, in which case you can skip the CLI and only compile the modules:
7474

7575
```bash
76-
# Build the PBS module, this corresponds to commit-boost-pbs in the releases
77-
cargo build --release --bin default-pbs
76+
# Build the PBS module
77+
cargo build --release --bin commit-boost-pbs
7878

79-
# Build the Signer module, this corresponds to commit-boost-signer in the releases
80-
cargo build --release --bin signer-module
79+
# Build the Signer module
80+
cargo build --release --bin commit-boost-signer
8181
```
8282

docs/docs/get_started/running/docker.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The Commit-Boost CLI will generate a dynamic `docker-compose.yml` file using the
99

1010
First run:
1111
```bash
12-
commit-boost init --config cb-config.toml
12+
commit-boost-cli init --config cb-config.toml
1313
```
1414
This will create up to three files:
1515
- `cb.docker-compose.yml`, which contains the full setup of the Commit-Boost services
@@ -20,7 +20,7 @@ This will create up to three files:
2020

2121
To start Commit-Boost run:
2222
```bash
23-
commit-boost start --docker cb.docker-compose.yml [--env .cb.env]
23+
commit-boost-cli start --docker cb.docker-compose.yml [--env .cb.env]
2424
```
2525

2626
This will run `docker compose up` with the correct envs, and start up the services including PBS, commit modules (if any), and metrics collection (if enabled).
@@ -34,14 +34,14 @@ If enabled, this will also start a Prometheus server on port `9090` and a Grafan
3434

3535
To check logs, run:
3636
```bash
37-
commit-boost logs
37+
commit-boost-cli logs
3838
```
3939
This will currently show all logs from the different services via the Docker logs interface. Logs are also optionally saved to file, depending on your `[logs]` configuration.
4040

4141
## Stop
4242

4343
To stop all the services and cleanup, simply run:
4444
```bash
45-
commit-boost stop
45+
commit-boost-cli stop
4646
```
4747
This will wind down all services and clear internal networks and file mounts.

0 commit comments

Comments
 (0)