Skip to content

Commit

Permalink
refactor: rename bin to codspeed
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Jul 15, 2024
1 parent 78580c7 commit 8beb1c8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ edition = "2021"
repository = "https://github.com/CodSpeedHQ/runner"
publish = false

[[bin]]
name = "codspeed"
path = "src/main.rs"


[dependencies]
anyhow = "1.0.75"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<div align="center">
<h1><code>codspeed-runner</code></h1>
<h1><code>codspeed</code></h1>

CLI to gather performance data from CI environments and upload performance reports to [CodSpeed](https://codspeed.io)
CLI to gather performance data and upload performance reports to [CodSpeed](https://codspeed.io)

[![CI](https://github.com/CodSpeedHQ/runner/actions/workflows/ci.yml/badge.svg)](https://github.com/CodSpeedHQ/runner/actions/workflows/ci.yml)
[![Discord](https://img.shields.io/badge/chat%20on-discord-7289da.svg)](https://discord.com/invite/MxpaCfKSqF)
[![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/)

</div>

The `codspeed-runner` CLI is designed to be used in CI environments.
The `codspeed` CLI is designed to be used both in local in CI environments.

The following providers are supported:
The following CI providers are supported:

- [GitHub Actions](https://docs.codspeed.io/ci/github-actions): Usage with [`@CodSpeedHQ/action`](https://github.com/CodSpeedHQ/action) is recommended.
- [Buildkite](https://docs.codspeed.io/ci/buildkite)
Expand Down Expand Up @@ -40,11 +40,11 @@ Refer to the [releases page](https://github.com/CodSpeedHQ/runner/releases) to s
Example of a command to run benchmarks with [Vitest](https://docs.codspeed.io/benchmarks/nodejs/vitest):

```bash
codspeed-runner run --token=$CODSPEED_TOKEN -- pnpm vitest bench
codspeed run --token=$CODSPEED_TOKEN -- pnpm vitest bench
```

```
Usage: codspeed-runner run [OPTIONS] [COMMAND]...
Usage: codspeed run [OPTIONS] [COMMAND]...
Arguments:
[COMMAND]... The bench command to run
Expand All @@ -65,5 +65,5 @@ Options:
Use the `CODSPEED_LOG` environment variable to set the logging level:

```bash
CODSPEED_LOG=debug codspeed-runner run ...
CODSPEED_LOG=debug codspeed run ...
```
4 changes: 2 additions & 2 deletions src/run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn show_banner() {
VERSION
);
println!("{}", banner);
debug!("codspeed-runner v{}", VERSION);
debug!("codspeed v{}", VERSION);
}

#[derive(Args, Debug)]
Expand Down Expand Up @@ -113,7 +113,7 @@ pub async fn run(args: RunArgs, api_client: &CodSpeedAPIClient) -> Result<()> {

if provider.get_provider_slug() == "local" {
if codspeed_config.auth.token.is_none() {
bail!("You have to authenticate the CLI first. Run `codspeed-runner auth login`.");
bail!("You have to authenticate the CLI first. Run `codspeed auth login`.");
}
debug!("Using the token from the CodSpeed configuration file");
config.set_token(codspeed_config.auth.token.clone());
Expand Down

0 comments on commit 8beb1c8

Please sign in to comment.