1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*!
diener - dependency diener is a tool for easily changing [Substrate](https://github.com/paritytech/substrate), [Polkadot](https://github.com/paritytech/polkadot) and [Cumulus](https://github.com/paritytech/cumulus) dependency versions
[](https://docs.rs/diener/) [](https://crates.io/crates/diener) [](https://crates.io/crates/diener)
* [Usage](#usage)
* [License](#license)
## Usage
### Update
The `update` subcommand changes all `Cargo.toml` files in a given folder to use
a specific branch/path/commit/tag.
Change all Substrate dependencies in a folder to a different branch:
```
diener update --substrate --branch diener-branch
```
Or you want to change Polkadot, Substrate and Cumulus dependencies to the same branch:
```
diener update --branch diener-branch-2
```
Diener also supports `tag` and `rev` as arguments.
If a depdendency is belongs to Substrate, Polkadot or Cumulus is currently done by looking at the git url.
It also only works for repos called `substrate`, `polkadot` or `cumulus`.
### Patch
The `patch` subcommand adds a patch section for each crate in a given cargo workspace
to the workspace `Cargo.toml` file in some other cargo workspace.
Patch all Substrate git dependencies to be build from a given path:
```
diener patch --crates-to-patch ../path/to/substrate/checkout --substrate
```
This subcommand can be compared to `.cargo/config` without using a deprecated
feature of Cargo ;)
## License
Licensed under either of
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
* [MIT license](http://opensource.org/licenses/MIT)
at your option.
*/
use Env;
use ;
/// diener is a tool for easily finding and changing Substrate or Polkadot dependency versions.
/// diener will not modified the cargo.lock file but update specific dependencies in the Cargo.toml files or the project.
/// Cli options of Diener