keycloak-scim/release.sh

54 lines
1.5 KiB
Bash
Raw Normal View History

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 ""
mvn -Padmin-preview,jboss-release,distribution-downloads,nexus-staging -DskipTests -DskipTestsuite -DretryFailedDeploymentCount=10 -DautoReleaseAfterClose=true clean deploy
2019-03-05 10:44:44 +00:00
echo "------------------------------------------------------------------------------------------------------------"
echo "Create tag:"
2019-03-05 10:44:44 +00:00
echo ""
git tag $VERSION
git push origin $VERSION
2019-03-05 10:44:44 +00:00
echo "------------------------------------------------------------------------------------------------------------"
echo "Upload to GitHub releases:"
2019-03-05 10:44:44 +00:00
echo ""
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 "------------------------------------------------------------------------------------------------------------"