Skip to content

Commit

Permalink
ci(release): Update bump version script
Browse files Browse the repository at this point in the history
This is adapted from the relay version.
  • Loading branch information
Floris Bruynooghe committed Dec 15, 2020
1 parent d358188 commit b58a447
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/bump-version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
set -euo pipefail

if [ "$(uname -s)" != "Linux" ]; then
echo "Symbolicator can only be released on Linux!"
echo "Please use the GitHub Action instead."
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR/..

Expand All @@ -10,7 +16,7 @@ NEW_VERSION="${2}"
echo "Current version: ${OLD_VERSION}"
echo "Bumping version: ${NEW_VERSION}"

VERSION_RE=${VERSION//\./\\.}
find . -name Cargo.toml -type f -exec sed -i '' -e "1,/^version/ s/^version.*/version = \"${NEW_VERSION}\"/" {} \;
TOML_FILES="$(git ls-files '*Cargo.toml')"
perl -pi -e "s/^version = .*\$/version = \"$NEW_VERSION\"/" $TOML_FILES

cargo update -p symbolicator

0 comments on commit b58a447

Please sign in to comment.