diff options
author | Eric Biggers <ebiggers@google.com> | 2019-11-06 10:32:55 -0800 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-11-06 10:32:55 -0800 |
commit | 9b616d9461576550ce4b75b1ab46b83e920fbcd1 (patch) | |
tree | 1c48ae71a205073445699525386b1124244a8085 | |
parent | 69ebc9db8c937f8504fe538fdee4252966a651ba (diff) | |
download | fsverity-utils-9b616d9461576550ce4b75b1ab46b83e920fbcd1.tar.gz |
Add release script
Signed-off-by: Eric Biggers <ebiggers@google.com>
-rwxr-xr-x | scripts/do-release | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/do-release b/scripts/do-release new file mode 100755 index 0000000..d129bf5 --- /dev/null +++ b/scripts/do-release @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e -u -o pipefail + +if [ $# != 1 ]; then + echo "Usage: $0 VERS" 1>&2 + echo " e.g. $0 1.0" 1>&2 + exit 2 +fi + +VERS=$1 +PKG=fsverity-utils-$VERS + +sed -E -i \ + "/\#define PACKAGE_VERSION/s/v[0-9]+(\.[0-9]+)*(-[a-z0-9]+)?/v$VERS/" \ + fsverity.c +git commit -a --signoff --message=v$VERS +git tag --sign v$VERS --message=$PKG + +git archive v$VERS --prefix=$PKG/ > $PKG.tar +rm -rf $PKG +tar xf $PKG.tar +( cd $PKG && make all ) +rm -r $PKG + +gpg --detach-sign --armor $PKG.tar +DESTDIR=/pub/linux/kernel/people/ebiggers/fsverity-utils/v$VERS +kup mkdir $DESTDIR +kup put $PKG.tar $PKG.tar.asc $DESTDIR/$PKG.tar.gz |