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