Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Oct 24, 2015
1 parent c6dd143 commit aa072fb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions release.sh
@@ -0,0 +1,34 @@
#!/bin/bash
set -e

if [ $# -ne 2 ]; then
echo Usage: $0 "<old version>" "<new version>"
exit 1
fi

old=$1
new=$2

tomls=$(find . -name Cargo.toml)
libs=$(find . -name lib.rs)

release_branch=release-v$new
git checkout -b $release_branch

sed -i -e "s/version = \"$old\"/version = \"$new\"/g" $tomls
sed -i -e "s/version = \"=$old\"/version = \"=$new\"/g" $tomls
sed -i -e "s|doc/v$old|doc/v$new|g" $tomls $libs README.md

git add .
git commit -ve -m "Release v$new"

git checkout release
git pull

git merge --no-ff $release_branch
git tag -a v$new

git checkout master
git pull

git merge --no-ff release

0 comments on commit aa072fb

Please sign in to comment.