https://github.com/paritytech/reref
A tool for transforming dependencies fields' on all Cargo.toml in a given project
https://github.com/paritytech/reref
cargo cli rust utils
Last synced: over 1 year ago
JSON representation
A tool for transforming dependencies fields' on all Cargo.toml in a given project
- Host: GitHub
- URL: https://github.com/paritytech/reref
- Owner: paritytech
- License: apache-2.0
- Created: 2022-05-08T22:17:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T18:51:53.000Z (over 2 years ago)
- Last Synced: 2025-01-06T18:36:55.822Z (over 1 year ago)
- Topics: cargo, cli, rust, utils
- Language: Rust
- Homepage: https://crates.io/crates/reref
- Size: 31.3 KB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## TOC
- [Installation](#installation)
- [Explanation](#explanation)
### From Crates.io
`cargo install reref`
### From Github
`cargo install reref --git https://github.com/paritytech/reref`
`reref` is a tool for transforming dependencies fields' on all `Cargo.toml` in a
given project.
Suppose you have the following `Cargo.toml`
```toml
[dependencies]
foo = { git = "https://github.com/org/foo", branch = "master" }
```
And you want to replace all `"branch" = "master"` with `"tag" = "v0.1"` where
`"git" = "https://github.com/org/foo"`. The command would be:
```sh
reref \
--project path/to/project \
--match-git https://github.com/org/foo \
--remove-field branch \
--add-field tag \
--added-field-value v0.1
```
If you'd like to automatically Git commit the modifications made, also add the
`--autocommit` flag.