Skip to content

Commit eeaab26

Browse files
authored
Support running the release script without adding it to $PATH (#22)
* Support running the release script without adding it to $PATH * cargo-version path is not specific to any one environment
1 parent 3b92c6e commit eeaab26

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

release/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Install required packages:
1010

1111
pip install -r release/requirements.txt
1212

13-
### Update PATH
14-
15-
Add the `release` folder to your `PATH`.
16-
1713
### Optional: GitHub CLI
1814

1915
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/.

release/release.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ REPOSITORY="origin"
1111
NOW_UTC=$(date -u '+%Y%m%d%H%M%S')
1212
RELEASE_BRANCH="release-$NOW_UTC"
1313

14+
CARGO_VERSION=$(dirname -- "${BASH_SOURCE[0]}")/cargo-version.py
15+
1416
ensure_release_branch() {
1517
local STATUS=$(git status -s | grep -v '??')
1618

@@ -49,9 +51,9 @@ main() {
4951
#
5052
# Release
5153
#
52-
cargo-version.py --release
54+
$CARGO_VERSION --release
5355
cargo update --workspace
54-
local RELEASE_VERSION=$(cargo-version.py --show)
56+
local RELEASE_VERSION=$($CARGO_VERSION --show)
5557

5658
update_changelog $RELEASE_VERSION
5759

@@ -61,9 +63,9 @@ main() {
6163
#
6264
# Development
6365
#
64-
cargo-version.py --next ${NEXT_LEVEL}
66+
$CARGO_VERSION --next ${NEXT_LEVEL}
6567
cargo update --workspace
66-
local NEXT_TAG=$(cargo-version.py --show)
68+
local NEXT_TAG=$($CARGO_VERSION --show)
6769

6870
git commit -am "bump version $NEXT_TAG"
6971

0 commit comments

Comments
 (0)