diff options
author | 2019-02-08 16:51:12 +0000 | |
---|---|---|
committer | 2019-02-08 16:54:42 +0000 | |
commit | 930bfc4fc90b0c29958cfe52caff85943f83f651 (patch) | |
tree | f7b4603be346ecc27e255588679bce0527317ee5 | |
parent | 9771df81dc2eefc140cbab492090416b20ec8fa5 (diff) | |
download | quiche-930bfc4fc90b0c29958cfe52caff85943f83f651.tar.gz quiche-930bfc4fc90b0c29958cfe52caff85943f83f651.tar.zst quiche-930bfc4fc90b0c29958cfe52caff85943f83f651.zip |
add script to automate releases
Diffstat (limited to '')
-rwxr-xr-x | release.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/release.sh b/release.sh new file mode 100755 index 00000000..41f69392 --- /dev/null +++ b/release.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 <version>" >&2 + exit 1 +fi + +if [ -n "$(git status -s)" ]; then + echo "Working directory is dirty." + exit 2 +fi + +VERSION=$1 + +cargo package + +sed -i "/version/ s/\"\(.*\)\"/\"$VERSION\"/" Cargo.toml +git add Cargo.toml +git commit -m $VERSION +git tag -a $VERSION -m "quiche $VERSION" --sign |