Skip to content

Commit

Permalink
MSLRES-4940 Allow making public release using release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav committed May 23, 2022
1 parent 754cd0c commit 02bbc26
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,29 @@

set -euo

INTERNAL_RELEASE=true

while getopts 'ph' OPTION; do
case "$OPTION" in
p)
echo "Making public release"
INTERNAL_RELEASE=false
;;
?)
echo "Makes an internal release, unless -p (public) flag is set. script usage: $(basename "$0") [-h] [-p]" >&2
exit 1
;;
esac
done
shift "$(($OPTIND -1))"

[ -z "$REPO_URL" ] && echo "Need to set REPO_URL" && exit 1;
[ -z "$GPG_PASSPHRASE" ] && echo "Need to set GPG_PASSPHRASE" && exit 1;

if [ "$INTERNAL_RELEASE" = true ] ; then
echo "Making internal release"
fi

mvn release:clean
mvn release:prepare --batch-mode "-Darguments=-DskipTests -Ddependency-check.skip=true"
mvn release:perform "-Darguments=-DskipTests -DuseInternalRepo=true"
mvn release:perform "-Darguments=-DskipTests -DuseInternalRepo=${INTERNAL_RELEASE}"

0 comments on commit 02bbc26

Please sign in to comment.