commit: | 88b24e7f456b19696bf2635839a5d45485266b96 |
author: | Trevor Bentley |
committer: | Trevor Bentley |
date: | Tue Dec 8 00:30:11 2020 +0100 |
parents: | bbccda37dbcab6182a5f9a74eb4e643a8fbd540f |
diff --git a/release.sh b/release.sh line changes: +21/-0 index 0000000..8d25a6c --- /dev/null +++ b/release.sh
@@ -0,0 +1,21 @@ +#!/bin/bash +set -eux + +VERSION=$(cat snitch.el |grep ";; Version:" | sed 's/.*: //') +PKG="snitch-$VERSION" + +sh test_snitch.sh +if [[ $? -ne 0 ]]; then + echo "Automated tests failed, not releasing." + exit 1 +fi +mkdir "$PKG" +sh gen_readme.sh +cp snitch*.el "$PKG" +cp README.md "$PKG" +tar -cf "$PKG.tar" "$PKG" + +if [[ "x$PKG" != "x" ]]; then + rm -rf "$PKG" +fi +echo "Released $PKG"