|
2 | 2 |
|
3 | 3 | ## Install requirements |
4 | 4 |
|
5 | | -Install Python 3 and required packages: |
| 5 | +### Python 3 |
| 6 | + |
| 7 | +A working python 3 installation is required by the cargo-version.py script. |
| 8 | + |
| 9 | +Install required packages: |
6 | 10 |
|
7 | 11 | pip install -r release/requirements.txt |
8 | 12 |
|
| 13 | +### Update PATH |
| 14 | + |
9 | 15 | Add the `release` folder to your `PATH`. |
10 | 16 |
|
| 17 | +### Optional: GitHub CLI |
| 18 | + |
| 19 | +Optionally, if you want to have a GitHub Pull-Request automatically created, you need the GitHib command line tools installed and properly configured. See https://cli.github.com/. |
| 20 | + |
11 | 21 | ## Usage |
12 | 22 |
|
13 | 23 | Go to the folder containing a Cargo workspace or crate and run: |
14 | 24 |
|
15 | | - release.sh [major|minor|patch] |
| 25 | + release.sh [major|minor|patch] [false] |
16 | 26 |
|
17 | 27 | This pushes two commits in a newly created release branch. When merging, __do not squash them__. |
18 | 28 |
|
| 29 | +Examples: |
| 30 | + |
| 31 | + # Perform release raise the minor version |
| 32 | + $ release.sh |
| 33 | + |
| 34 | + # Perform a release but do not push anything to origin |
| 35 | + $ release.sh minor false |
| 36 | + |
| 37 | + # Perform a release and raise the major version |
| 38 | + $ release.sh major |
| 39 | + |
| 40 | +## Description |
| 41 | + |
| 42 | +The release process performs the following steps: |
| 43 | +0. Create a release branch from `main`. |
| 44 | +1. Update the release version in the cargo workspace by dropping the "-nightly" token. |
| 45 | +2. Update `Cargo.lock` with the new version. |
| 46 | +3. Commit and tag the release. |
| 47 | +4. Set the version to the next development version by increasing the 'minor' (by default) part and adding the '-nightly' prerelease token. |
| 48 | +5. Update `Cargo.lock` with the new version. |
| 49 | +6. Commit the next release. |
| 50 | +7. Push the two commits. This is skipped if the second argument was `false`. |
| 51 | +8. __Optional__: if the GitHub cli is installed, a PR is created. This is also skipped if the second argument was `false`. |
| 52 | + |
| 53 | +## Future development |
19 | 54 |
|
| 55 | +Automatically update the change log and readme files. |
0 commit comments