diff --git a/how-to-make-a-release b/how-to-make-a-release new file mode 100644 index 00000000..b95e0faa --- /dev/null +++ b/how-to-make-a-release @@ -0,0 +1,4 @@ +1) Update VERSION file and commit +2) Tag new release with "v${VERSION}" +3) Run "./scripts/mkrelease.sh -n ${VERSION}" +4) Push command and tag to github and use github ui to draft a new release and upload the tarball diff --git a/scripts/mkrelease.sh b/scripts/mkrelease.sh index ae616aa0..aa07b85a 100755 --- a/scripts/mkrelease.sh +++ b/scripts/mkrelease.sh @@ -14,6 +14,7 @@ set -e pkg="clr-boot-manager" +SIGN=0 print_help() { echo -e "mkrelease.sh [--help] [options] @@ -36,6 +37,10 @@ for curr in "$@"; do shift shift ;; + "--sign"|"-s") + SIGN=1 + shift + ;; "--help"|"-h") print_help; exit 0;; @@ -44,6 +49,7 @@ done if [ "$version" == "" ]; then echo "No version provided, please use \"--new-version\" flag. Use --help for more information." + exit 1 fi echo "${version}" > VERSION @@ -59,5 +65,7 @@ git submodule update xz -9 "${pkg}-${version}.tar" # Automatically sign the tarball -gpg --armor --detach-sign "${pkg}-${version}.tar.xz" -gpg --verify "${pkg}-${version}.tar.xz.asc" +if [ $SIGN -eq 1 ]; then + gpg --armor --detach-sign "${pkg}-${version}.tar.xz" + gpg --verify "${pkg}-${version}.tar.xz.asc" +fi