Skip to content

Commit

Permalink
Allow setting quickstarts to unreleased npm dependencies (#518)
Browse files Browse the repository at this point in the history
Closes: #517

Signed-off-by: stianst <[email protected]>
  • Loading branch information
stianst authored Nov 23, 2023
1 parent 18bfe39 commit 23788db
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions set-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

NEW_VERSION=$1

function updateNpmDep() {
FILE="$1"
PACKAGE="$2"

sed -i 's|"'"$PACKAGE"'": "[^"]*"|"'"$PACKAGE"'": "'"$NEW_VERSION"'"|g' $FILE
}

mvn versions:set -Dversion.keycloak=$NEW_VERSION -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=*

sed -i 's/\$\$VERSION\$\$/'"$NEW_VERSION"'/g' kubernetes/keycloak.yaml
Expand All @@ -17,11 +24,11 @@ else
fi

# JS quickstart
npm i @keycloak/keycloak-admin-client@$NPM_ADMIN_CLIENT --prefix js/spa
updateNpmDep js/spa/package.json "@keycloak/keycloak-admin-client"

# NodeJS quickstart
npm i @keycloak/keycloak-admin-client@$NPM_ADMIN_CLIENT --prefix nodejs/resource-server
npm i keycloak-connect@$NPM_NODE_ADAPTER --prefix nodejs/resource-server
updateNpmDep nodejs/resource-server/package.json "@keycloak/keycloak-admin-client"
updateNpmDep nodejs/resource-server/package.json "keycloak-connect"

echo "New Mvn Version: $NEW_VERSION" >&2
echo "Used NPM dependency of keycloak-admin-client: $NPM_ADMIN_CLIENT" >&2
Expand Down

0 comments on commit 23788db

Please sign in to comment.