Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating set-version.sh and adding set-server-version.sh. Updated server version to 26.0.7 #640

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"delete-realm": "node scripts/delete-realm.js"
},
"dependencies": {
"@keycloak/keycloak-admin-client": "https://github.com/keycloak/keycloak/releases/download/nightly/keycloak-admin-client-999.0.0-SNAPSHOT.tgz",
"@keycloak/keycloak-admin-client": "26.0.7",
"express": "^4.18.2",
"keycloak-js": "https://github.com/keycloak/keycloak/releases/download/nightly/keycloak-js-999.0.0-SNAPSHOT.tgz"
"keycloak-js": "26.0.7"
},
"devDependencies": {
"@playwright/test": "^1.33.0"
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
containers:
- name: keycloak
image: quay.io/keycloak/keycloak:$$VERSION$$
image: quay.io/keycloak/keycloak:26.0.7
args: ["start-dev"]
env:
- name: KEYCLOAK_ADMIN
Expand Down
4 changes: 2 additions & 2 deletions nodejs/resource-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"delete-realm": "node scripts/delete-realm.js"
},
"dependencies": {
"@keycloak/keycloak-admin-client": "https://github.com/keycloak/keycloak/releases/download/nightly/keycloak-admin-client-999.0.0-SNAPSHOT.tgz",
"@keycloak/keycloak-admin-client": "26.0.7",
"express": "^4.18.2",
"keycloak-connect": "https://github.com/keycloak/keycloak-nodejs-connect/releases/download/nightly/keycloak-nodejs-connect.tgz"
"keycloak-connect": "26.0.7"
},
"devDependencies": {
"keycloak-request-token": "^0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions openshift/keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
iconClass: icon-sso
openshift.io/display-name: Keycloak
tags: keycloak
version: $$VERSION$$
version: 26.0.7
objects:
- apiVersion: v1
kind: Service
Expand Down Expand Up @@ -65,7 +65,7 @@ objects:
value: '${KEYCLOAK_ADMIN_PASSWORD}'
- name: KC_PROXY
value: 'edge'
image: quay.io/keycloak/keycloak:$$VERSION$$
image: quay.io/keycloak/keycloak:26.0.7
livenessProbe:
failureThreshold: 100
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</licenses>

<properties>
<version.keycloak>26.0.6</version.keycloak>
<version.keycloak>26.0.7</version.keycloak>
<version.keycloak.client>26.0.3</version.keycloak.client>

<servlet.api.30.version>1.0.2.Final</servlet.api.30.version>
Expand Down
37 changes: 37 additions & 0 deletions set-server-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash -e

NEW_VERSION=$1

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

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

mvn versions:set-property -Dproperty=version.keycloak -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false

sed -i 's/ image:\(.*\):.*/ image:\1:'"$NEW_VERSION"'/g' kubernetes/keycloak.yaml
sed -i 's/ version: .*/ version: '"$NEW_VERSION"'/g' openshift/keycloak.yaml
sed -i 's/ image:\(.*\):.*/ image:\1:'"$NEW_VERSION"'/g' openshift/keycloak.yaml

if [[ $NEW_VERSION == "999.0.0-SNAPSHOT" ]]; then
# Use the nightly versions of adapters
NPM_ADMIN_CLIENT="https://github.com/keycloak/keycloak/releases/download/nightly/keycloak-admin-client-999.0.0-SNAPSHOT.tgz"
NPM_NODE_ADAPTER="https://github.com/keycloak/keycloak-nodejs-connect/releases/download/nightly/keycloak-nodejs-connect.tgz";
else
NPM_ADMIN_CLIENT=$NEW_VERSION
NPM_NODE_ADAPTER=$NEW_VERSION
fi

# JS quickstart
updateNpmDep js/spa/package.json "@keycloak/keycloak-admin-client"
updateNpmDep js/spa/package.json "keycloak-js"

# NodeJS quickstart
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
echo "Used NPM dependency of node-adapter: $NPM_NODE_ADAPTER" >&2
35 changes: 3 additions & 32 deletions set-version.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,7 @@
#!/bin/bash -e

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=*
# Sets new version of the project in all pom.xml files

sed -i 's/\$\$VERSION\$\$/'"$NEW_VERSION"'/g' kubernetes/keycloak.yaml
sed -i 's/\$\$VERSION\$\$/'"$NEW_VERSION"'/g' openshift/keycloak.yaml

if [[ $NEW_VERSION == "999.0.0-SNAPSHOT" ]]; then
# Use the nightly versions of adapters
NPM_ADMIN_CLIENT="https://github.com/keycloak/keycloak/releases/download/nightly/keycloak-admin-client-999.0.0-SNAPSHOT.tgz"
NPM_NODE_ADAPTER="https://github.com/keycloak/keycloak-nodejs-connect/releases/download/nightly/keycloak-nodejs-connect.tgz";
else
NPM_ADMIN_CLIENT=$NEW_VERSION
NPM_NODE_ADAPTER=$NEW_VERSION
fi

# JS quickstart
updateNpmDep js/spa/package.json "@keycloak/keycloak-admin-client"
updateNpmDep js/spa/package.json "keycloak-js"

# NodeJS quickstart
updateNpmDep nodejs/resource-server/package.json "@keycloak/keycloak-admin-client"
updateNpmDep nodejs/resource-server/package.json "keycloak-connect"
NEW_VERSION=$1

echo "New Mvn Version: $NEW_VERSION" >&2
echo "Used NPM dependency of keycloak-admin-client: $NPM_ADMIN_CLIENT" >&2
echo "Used NPM dependency of node-adapter: $NPM_NODE_ADAPTER" >&2
mvn versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=*
Loading