Skip to content

Commit

Permalink
Update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlattimore committed Dec 6, 2018
1 parent 4386ebe commit 61942b0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
#!/bin/bash
set -e
cargo build
cargo test --all
if [ $# -ne 1 ]; then
echo "Usage: $0 {version}" >&2
exit 1
fi
if ! git diff-index --quiet HEAD --; then
echo "Please commit all changes first" >&2
exit 1
fi
VERSION="$1"
git pull --rebase
perl -pi -e 's/^version = "[\d\.]+"/version = "'$VERSION'"/;\
s/^evcxr = \{ version = "=[\d\.]+"/evcxr = \{ version = "='$VERSION'"/' \
evcxr/Cargo.toml \
evcxr_repl/Cargo.toml \
evcxr_jupyter/Cargo.toml
cargo build
cargo test --all
git commit -a -m "Bump vesion to $VERSION"
cd evcxr
cargo publish
cd ../evcxr_repl
Expand Down

0 comments on commit 61942b0

Please sign in to comment.