2019-03-05 10:44:44 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
DIR="$PWD"
|
2019-03-06 10:33:57 +00:00
|
|
|
source release-details
|
|
|
|
|
2019-03-05 10:44:44 +00:00
|
|
|
echo "Version: $VERSION"
|
|
|
|
|
|
|
|
echo "------------------------------------------------------------------------------------------------------------"
|
|
|
|
echo "Building:"
|
|
|
|
echo ""
|
|
|
|
|
2022-04-21 09:39:00 +00:00
|
|
|
mvn -Pgpg,jboss-release,distribution-downloads,nexus-staging -DskipTests -DskipTestsuite -DretryFailedDeploymentCount=10 -DautoReleaseAfterClose=true clean deploy
|
2019-03-05 10:44:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
echo "------------------------------------------------------------------------------------------------------------"
|
2021-01-06 11:02:11 +00:00
|
|
|
echo "Create tag:"
|
2019-03-05 10:44:44 +00:00
|
|
|
echo ""
|
|
|
|
|
2021-01-06 11:02:11 +00:00
|
|
|
git tag $VERSION
|
|
|
|
git push origin $VERSION
|
2019-03-05 10:44:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
echo "------------------------------------------------------------------------------------------------------------"
|
2021-01-06 11:02:11 +00:00
|
|
|
echo "Upload to GitHub releases:"
|
2019-03-05 10:44:44 +00:00
|
|
|
echo ""
|
|
|
|
|
2021-01-06 11:02:11 +00:00
|
|
|
hub release create -m "$VERSION" $VERSION
|
|
|
|
cd distribution/downloads/target/$VERSION
|
|
|
|
|
|
|
|
for i in *; do
|
|
|
|
echo "Uploading $i"
|
|
|
|
hub release edit -a $i -m "" $VERSION
|
|
|
|
done
|
2019-03-05 10:44:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
echo "------------------------------------------------------------------------------------------------------------"
|
|
|
|
echo "NPM release:"
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
TMP=`mktemp -d`
|
|
|
|
cd $TMP
|
2019-03-06 10:33:57 +00:00
|
|
|
unzip $DIR/distribution/adapters/js-adapter-npm-zip/target/keycloak-js-adapter-npm-dist-$VERSION.zip
|
2019-03-05 10:44:44 +00:00
|
|
|
cd keycloak-js-adapter-npm-dist-$VERSION
|
|
|
|
|
|
|
|
npm publish
|
|
|
|
|
|
|
|
cd $DIR
|
|
|
|
rm -rf $TMP
|
|
|
|
|
|
|
|
|
|
|
|
echo "------------------------------------------------------------------------------------------------------------"
|
|
|
|
echo "Done"
|
|
|
|
echo "------------------------------------------------------------------------------------------------------------"
|