diff options
author | Naoum Hankache <naoum88@gmail.com> | 2020-02-26 20:14:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 20:14:39 +0300 |
commit | a6253c2b109538031b7c9b52cbd56adb266c4746 (patch) | |
tree | 1b349ba24e7732118d884b4122ef741f091e2704 /bin/mkrelease.sh | |
parent | 139ba6333a8b7497b5349a6ed9fde963ea7a90e7 (diff) | |
parent | 34714c9ec604da31fc87a98f1f7f165ea50214d1 (diff) |
Merge pull request #144 from Tyil/master
Get Rakudo Star working for 2019.07.1
Diffstat (limited to 'bin/mkrelease.sh')
-rwxr-xr-x | bin/mkrelease.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/bin/mkrelease.sh b/bin/mkrelease.sh new file mode 100755 index 0000000..5dc036d --- /dev/null +++ b/bin/mkrelease.sh @@ -0,0 +1,54 @@ +#! /usr/bin/env sh + +readonly BASEDIR=$(CDPATH="" cd -- "$(dirname -- "$0")/.." && pwd -P) + +main() +{ + # Handle opts + opts "$@" + shift "$OPTS" + unset OPTS + + # Show help + [ "$OPT_HELP_ONLY" ] && usage && exit 0 + [ -z "$1" ] && usage && exit 1 + + # Make the release + cd -- "$BASEDIR" + make -f tools/star/Makefile all VERSION="$1" \ + && make -f tools/star/Makefile release VERSION="$1" +} + +opts() +{ + OPTS=0 + + while getopts ":h" opt + do + case "$opt" in + h) OPT_HELP_ONLY=1 ;; + *) + printf "Invalid option passed: %s\n" "$OPTARG" >&2 + ;; + esac + done +} + +usage() +{ + cat <<EOF +Usage: + $(basename "$0") -h + $(basename "$0") <version> + +Make a releasable tarball of Rakudo Star. You must specify a version number, +which will be used to name the tarball. The tarball will be put in +$BASEDIR/work/release. You will still have to manually create checksums and a +PGP signature. + +Options: + -h Show this help text and exit. +EOF +} + +main "$@" |