Add scripts needed for release. (#940)

This commit is contained in:
Stan Silvert 2021-08-06 13:49:38 -04:00 committed by GitHub
parent f3c2cce45a
commit 27d55c63cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

3
get-version.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/bash -e
awk '/"version":/ { print $2 }' package.json | sed 's/"//g' | sed 's/,//'

23
release.sh Normal file
View file

@ -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

5
set-version.sh Normal file
View file

@ -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=*