5
5
6
6
Nix uses [ cargo release] ( https://github.com/crate-ci/cargo-release ) to automate
7
7
the release process. Based on changes since the last release, pick a new
8
- version number following semver conventions. For nix , a change that drops
8
+ version number following semver conventions. For Nix , a change that drops
9
9
support for some Rust versions counts as a breaking change, and requires a
10
10
major bump.
11
11
@@ -14,24 +14,53 @@ The release is prepared as follows:
14
14
> NOTE: the following procedure should be done directly against the master
15
15
> branch of the repo.
16
16
17
- - Ask for a new libc version if, necessary. It usually is. Then update the
18
- dependency in ` Cargo.toml ` to rely on a release from crates.io.
17
+ - Clone the ` nix-rust/nix ` repository with your preferred way, and ` cd ` to it:
18
+
19
+ ``` sh
20
+ $ git clone https://github.com/nix-rust/nix.git
21
+ $ cd nix
22
+ ```
23
+
24
+ - If we are using ` libc ` from git, replace it with a usable release from crates.io.
19
25
20
26
``` diff
21
27
[dependencies]
22
28
-libc = { git = "https://github.com/rust-lang/libc", rev = "<Revision>", features = ["extra_traits"] }
23
- +libc = { version = "<New Version>", features = ["extra_traits"] }
29
+ +libc = { version = "<Version>", features = ["extra_traits"] }
24
30
```
25
31
26
32
- Update the version number in ` Cargo.toml `
27
33
- Generate ` CHANGELOG.md ` for this release by
28
- ` towncrier build --version=<VERSION> --yes `
34
+
35
+ ``` sh
36
+ $ towncrier build --version=< VERSION> --yes
37
+ Loading template...
38
+ Finding news fragments...
39
+ Rendering news fragments...
40
+ Writing to newsfile...
41
+ Staging newsfile...
42
+ Removing the following files:
43
+ nix/changelog/xxxx.xxxx.md
44
+ nix/changelog/xxxx.xxxx.md
45
+ ...
46
+ nix/changelog/xxxx.xxxx.md
47
+ Removing news fragments...
48
+ Done!
49
+ ```
50
+
51
+ - Push the changes made by the above steps to the master branch
29
52
30
53
- Ensure you have a crates.io token
31
- 1 . With the ` publich -update` scope
54
+ 1 . With the ` publish -update` scope
32
55
2 . Can be used for crate ` nix `
33
56
3 . It is set via ` cargo login `
34
57
58
+ If not, create a new token [ here] ( https://crates.io/settings/tokens ) , and set
59
+ it.
60
+
35
61
- Confirm that everything's ready for a release by running
36
- ` cargo release <patch|minor|major> `
37
- - Create the release with ` cargo release -x <patch|minor|major> `
62
+ ` cargo release <VERSION> `
63
+ - Create the release with ` cargo release -x <VERSION> ` , this step will publish
64
+ the version to crates.io and push the new version tag to GitHub.
65
+
66
+ - Congratulations on a new Nix release!
0 commit comments