diff --git a/README.md b/README.md
index d8a8490..a18caa5 100644
--- a/README.md
+++ b/README.md
@@ -91,6 +91,12 @@ Download the latest and greatest pre-built binaries from here https://github.com
and then add them to your `PATH`, probably renaming the binary to just `acci-ping` and then you're ready to
go!
+Or use:
+```sh
+go install github.com/Lexer747/acci-ping@v1.0.3
+```
+To build and install locally via the `go install` toolchain
+
🪟 Windows
@@ -127,8 +133,6 @@ sudo sysctl -w net.ipv4.ping_group_range="1 0"
```
-
-
## About
This binary relies on [golang.org/x/net/icmp](https://pkg.go.dev/golang.org/x/net/icmp) and the stdlib `net`
diff --git a/releases/do-release.sh b/releases/do-release.sh
index 93ff72f..cdfa513 100755
--- a/releases/do-release.sh
+++ b/releases/do-release.sh
@@ -6,6 +6,8 @@
#
# SPDX-License-Identifier: GPL-2.0-only
+set -x
+
ROOT=$(git rev-parse --show-toplevel)
SCRIPT_DIR="$ROOT"/releases/
TOOLS_DIR="$ROOT"/tools/
@@ -14,6 +16,9 @@ TIMESTAMP=$(date --rfc-3339=ns)
MINOR=${1:-"no"}
PATCH=${2:-"yes"}
+VERSION=$(cat "$SCRIPT_DIR"version.txt)
+BEFORE_README="go install github.com/Lexer747/acci-ping@v$VERSION"
+
if [[ "$MINOR" == "yes" ]]; then
PATCH="yes"
fi
@@ -22,7 +27,7 @@ function increment {
MINOR=$1
PATCH=$2
SCRIPT_DIR=$3
- VERSION=$(cat "$SCRIPT_DIR"/version.txt)
+ VERSION=$(cat "$SCRIPT_DIR"version.txt)
IFS='.' read -ra ADDR <<< "$VERSION"
if [[ "$PATCH" == "yes" ]]; then
(( ADDR[2]++ ))
@@ -31,18 +36,23 @@ function increment {
(( ADDR[1]++ ))
ADDR[2]="0"
fi
- echo "${ADDR[0]}.${ADDR[1]}.${ADDR[2]}" > "$SCRIPT_DIR"/version.txt
+ echo "${ADDR[0]}.${ADDR[1]}.${ADDR[2]}" > "$SCRIPT_DIR"version.txt
}
increment "$MINOR" "$PATCH" "$SCRIPT_DIR"
-VERSION=$(cat "$SCRIPT_DIR"/version.txt)
+VERSION=$(cat "$SCRIPT_DIR"version.txt)
-git add "$SCRIPT_DIR"/version.txt
-git commit -m "New release $VERSION"
+AFTER_README="go install github.com/Lexer747/acci-ping@v$VERSION"
-git tag -a "$VERSION" -m "Tagged automatically by do-release.sh at $TIMESTAMP"
+git add "$SCRIPT_DIR"version.txt
+git commit -m "New release v$VERSION"
+
+git tag -a "v$VERSION" -m "Tagged automatically by do-release.sh at $TIMESTAMP"
"$TOOLS_DIR"/build.sh sign
-cp "$ROOT/out/linux/amd64/acci-ping-linux-amd64" "$HOME/go/bin/acci-ping"
\ No newline at end of file
+cp "$ROOT/out/linux/amd64/acci-ping-linux-amd64" "$HOME/go/bin/acci-ping"
+
+sed "s\\$BEFORE_README\\$AFTER_README\\g" README.tmp.md
+mv README.tmp.md README.md
\ No newline at end of file