Skip to content

Commit 83680d9

Browse files
committed
Rename cargo-rbmt following cargo subcommand conventions
1 parent 4eb8e3b commit 83680d9

File tree

14 files changed

+38
-30
lines changed

14 files changed

+38
-30
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
members = [
33
"releases",
4-
"tasks",
4+
"cargo-rbmt",
55
]
66
resolver = "2"
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
2-
name = "rust-bitcoin-maintainer-tools"
2+
name = "cargo-rbmt"
33
version = "0.1.0"
44
authors = ["Nick Johnson <[email protected]>"]
55
license = "CC0-1.0"
66
edition = "2021"
77
rust-version = "1.74.0"
88

99
[[bin]]
10-
name = "rbmt"
10+
name = "cargo-rbmt"
1111
path = "src/main.rs"
1212

1313
[dependencies]

tasks/README.md renamed to cargo-rbmt/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ features_with_no_std = ["serde", "rand"]
6363

6464
## Lock Files
6565

66-
To ensure your crate works with the full range of declared dependency versions, `rbmt` requires two lock files in your repository.
66+
To ensure your crate works with the full range of declared dependency versions, `cargo-rbmt` requires two lock files in your repository.
6767

6868
* `Cargo-minimal.lock` - Minimum versions that satisfy your dependency constraints.
6969
* `Cargo-recent.lock` - Recent/updated versions of dependencies.
7070

71-
The `rbmt lock` command generates and maintains these files for you. You can then use `--lock-file` with any command to test against either version set.
71+
The `lock` command generates and maintains these files for you. You can then use `--lock-file` with any command to test against either version set.
7272

7373
### Usage
7474

7575
**Generate/update lock files**
7676

7777
```bash
78-
rbmt lock
78+
cargo rbmt lock
7979
```
8080

8181
1. Verify that direct dependency versions aren't being bumped by transitive dependencies.
@@ -86,49 +86,49 @@ rbmt lock
8686

8787
```bash
8888
# Test with minimal versions.
89-
rbmt --lock-file minimal test stable
89+
cargo rbmt --lock-file minimal test stable
9090

9191
# Test with recent versions.
92-
rbmt --lock-file recent test stable
92+
cargo rbmt --lock-file recent test stable
9393

9494
# Works with any command.
95-
rbmt --lock-file minimal lint
96-
rbmt --lock-file minimal docs
95+
cargo rbmt --lock-file minimal lint
96+
cargo rbmt --lock-file minimal docs
9797
```
9898

9999
When you specify `--lock-file`, the tool copies that lock file to `Cargo.lock` before running the command. This allows you to test your code against different dependency version constraints.
100100

101101
## Workspace Integration
102102

103-
`rbmt` can simply be installed globally, or as a dev-dependency for more granular control of dependency versions.
103+
`cargo-rbmt` can simply be installed globally, or as a dev-dependency for more granular control of dependency versions.
104104

105105
### 1. Install globally
106106

107107
Install the tool globally on your system with `cargo install`.
108108

109109
```bash
110-
cargo install rust-bitcoin-maintainer-tools@0.1.0
110+
cargo install cargo-rbmt@0.1.0
111111
```
112112

113-
Then run from anywhere in your repository.
113+
Then run from anywhere in your repository as a cargo subcommand. It can also be called directly as `cargo-rbmt`.
114114

115115
```bash
116-
rbmt lint
116+
cargo rbmt lint
117117
```
118118

119119
### 2. Add as a dev-dependency
120120

121-
Add as a dev-dependency to a workspace member. This pins the tool version in your lockfile for reproducible builds.
121+
Add as a dev-dependency to a workspace member. This pins the tool version in your lockfile for reproducible builds. But this also means that `cargo-rbmt` dependencies could influence version resolution for the workspace.
122122

123123
```toml
124124
[dev-dependencies]
125-
rust-bitcoin-maintainer-tools = "0.1.0"
125+
cargo-rbmt = "0.1.0"
126126
```
127127

128128
Then run via cargo.
129129

130130
```bash
131-
cargo run --bin rbmt -- lint
131+
cargo run --bin cargo-rbmt -- lint
132132
```
133133

134134
It might be worth wrapping in an [xtask](https://github.com/matklad/cargo-xtask) package for a clean interface.
File renamed without changes.

0 commit comments

Comments
 (0)