From cd1405fc3994fda52d266811ff07f7021931df9d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 16 Jul 2013 12:37:04 +0200 Subject: Release script for the MAT --- release.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 release.sh diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..08ee5fe --- /dev/null +++ b/release.sh @@ -0,0 +1,38 @@ +#!/bin/sh + + +# Release script for the MAT + + +echo "Previous version: $(git describe --abbrev=0)" +echo "Please enter the new version number" +read VERSION + +echo '[+] Update version number' +sed s/__version__\ =\ \'[0-9\.]*\'/__version__\ =\ \'${VERSION}\'/ MAT/mat.py # > mat.py +sed s/__version__\ =\ \'[0-9\.]*\'/__version__\ =\ \'${VERSION}\'/ setup.py # > mat.py + +echo '[+] Update changelog' +vim -O CHANGELOG <(git log --graph --pretty=format:'%h -%d %s (%cr) )<%an>' --abbrev-commit --date=relative) + +echo '[+] Commit the changelog' +git commit CHANGELOG MAT/mat.py setup.py -m 'Update changelog and bump version' + +echo '[+] Create a tag' +git tag -s ${VERSION} + +echo '[+] Push the tag' +git push --tags origin + +echo '[+] Create the release archive' +git archive --format=tar.gz --prefix=mat-${VERSION}/ ${VERSION} > mat-${VERSION}.tar.gz + +echo '[+] Sign the archive' +gpg --armor --detach-sign mat-${VERSION}.tar.gz + +# Recall +echo '[+] Release done' +echo "[*] Don't forget to:" +echo "\t- Upload archives to https://mat.boum.org/files" +echo "\t- Add changelog to https://mat.boum.org/" +echo "\t- Have a nice day" -- cgit v1.3