Skip to content

Commit c9d6939

Browse files
dzvonsquell
authored andcommitted
chore(release): Automate version updates in README instructions
Closes #1122
1 parent fbcc6a1 commit c9d6939

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ We currently only offer these for x86-64 systems.
5252
We recommend installing sudo-rs and su-s in your `/usr/local` hierarchy so it can co-exist with
5353
your existing sudo installation. You can achieve this using the commands:
5454
```sh
55-
sudo tar -C /usr/local -xvf sudo-VERSION.tar.gz
55+
sudo tar -C /usr/local -xvf sudo-0.2.6.tar.gz
5656
```
5757
and for su-rs:
5858
```sh
59-
sudo tar -C /usr/local -xvf su-VERSION.tar.gz
59+
sudo tar -C /usr/local -xvf su-0.2.6.tar.gz
6060
```
6161
This will install sudo-rs and su-rs in `/usr/local/bin` using the usual commands `sudo` and `su`; it
6262
will also install our version of `visudo` in that location.

util/update-version.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ else
2727
sed -i 's/^version\s*=\s*".*"/version = "'"$NEW_VERSION"'"/' "$PROJECT_DIR/Cargo.toml"
2828
fi
2929

30+
echo "Updating version in README.md installation instructions"
31+
sed -i 's/sudo-\(VERSION\|[0-9]\+\.[0-9]\+\.[0-9]\+\)\.tar\.gz/sudo-'"$NEW_VERSION"'\.tar\.gz/g' "$PROJECT_DIR/README.md"
32+
sed -i 's/su-\(VERSION\|[0-9]\+\.[0-9]\+\.[0-9]\+\)\.tar\.gz/su-'"$NEW_VERSION"'\.tar\.gz/g' "$PROJECT_DIR/README.md"
33+
3034
echo "Updating version in man pages"
3135
sed -i 's/^title: SU(1) sudo-rs .*/title: SU(1) sudo-rs '"$NEW_VERSION"' | sudo-rs/' "$PROJECT_DIR"/docs/man/su.1.md
3236
sed -i 's/^title: SUDO(8) sudo-rs .*/title: SUDO(8) sudo-rs '"$NEW_VERSION"' | sudo-rs/' "$PROJECT_DIR"/docs/man/sudo.8.md

0 commit comments

Comments
 (0)