-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package version | ||
|
||
const RobotVersion = "v2.0.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Bump the version number in ./internal/version/version.go | ||
# Usage: ./tools/bump_version.sh "v1.0.0" | ||
|
||
set -e | ||
|
||
CURRENT_VERSION=$(grep -oP 'const RobotVersion = "\K[^"]+' internal/version/version.go) | ||
echo "Current version: $CURRENT_VERSION" | ||
|
||
if [ -z "$1" ]; then | ||
echo "Usage: ./tools/bump_version.sh \"v1.0.0\"" | ||
exit 1 | ||
fi | ||
|
||
if [ "$CURRENT_VERSION" == "$1" ]; then | ||
echo "Version $1 is the same as the current version" | ||
exit 1 | ||
fi | ||
|
||
echo "Bumping version to $1 in internal/version/version.go" | ||
sed -i "s/const RobotVersion = \"$CURRENT_VERSION\"/const RobotVersion = \"$1\"/" internal/version/version.go | ||
|
||
echo "Bumping version to $1 in README.md" | ||
sed -i "s/# Masjid's Droid $CURRENT_VERSION/# Masjid's Droid $1/" README.md |