From 27d55c63cc6b7024ad71cf499cf969433915be1b Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Fri, 6 Aug 2021 13:49:38 -0400 Subject: [PATCH] Add scripts needed for release. (#940) --- get-version.sh | 3 +++ release.sh | 23 +++++++++++++++++++++++ set-version.sh | 5 +++++ 3 files changed, 31 insertions(+) create mode 100644 get-version.sh create mode 100644 release.sh create mode 100644 set-version.sh diff --git a/get-version.sh b/get-version.sh new file mode 100644 index 0000000000..bcf6c84fc0 --- /dev/null +++ b/get-version.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +awk '/"version":/ { print $2 }' package.json | sed 's/"//g' | sed 's/,//' \ No newline at end of file diff --git a/release.sh b/release.sh new file mode 100644 index 0000000000..1f09a6d4b4 --- /dev/null +++ b/release.sh @@ -0,0 +1,23 @@ +#!/bin/bash -e + +VERSION=`./get-version.sh` +echo "Version: $VERSION" + +echo "------------------------------------------------------------------------------------------------------------" +echo "Building:" +echo "" + +mvn --file=./keycloak-theme/pom.xml -DretryFailedDeploymentCount=10 -DautoReleaseAfterClose=true clean deploy + +echo "------------------------------------------------------------------------------------------------------------" +echo "Create tag:" +echo "" + +git tag $VERSION +git push origin $VERSION + +echo "------------------------------------------------------------------------------------------------------------" +echo "Upload to GitHub releases:" +echo "" + +hub release create -m "$VERSION" $VERSION \ No newline at end of file diff --git a/set-version.sh b/set-version.sh new file mode 100644 index 0000000000..a1d0ae9034 --- /dev/null +++ b/set-version.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +NEW_VERSION=$1 +sed -i 's/"version": .*/"version": "'$NEW_VERSION'",/' package.json +mvn --file=./keycloak-theme/pom.xml versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=* \ No newline at end of file