-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrate direct download of the aws jdbc wrapper
- Loading branch information
1 parent
3ad909f
commit 0c5c7ae
Showing
5 changed files
with
68 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Script: get_aws_jdbc_wrapper_version.sh | ||
# Description: Finds the aws jdbc wrapper version of the Keycloak version from the pom.xml | ||
# Usage: get_aws_jdbc_wrapper_version.sh <keycloak-version> | ||
|
||
# Function to extract the first number from a version string | ||
get_first_number() { | ||
echo "$1" | cut -d '.' -f1 | ||
} | ||
|
||
# Function to compare version numbers considering only the first number | ||
version_lt() { | ||
[ "$(get_first_number "$1")" -lt "$(get_first_number "$2")" ] | ||
} | ||
|
||
# Keycloak only started to reference the aws_jdbc_wrapper version starting with v24, defaulting to 24 if version is before that | ||
if version_lt "$1" "24"; then | ||
VERSION="24.0.1" | ||
else | ||
VERSION="$1" | ||
fi | ||
|
||
# Fetch the AWS JDBC wrapper version from the pom.xml file | ||
AWS_JDBC_VERSION="$(curl -s "https://raw.githubusercontent.com/keycloak/keycloak/$VERSION/pom.xml" | awk -F'[><]' '/<aws-jdbc-wrapper.version>/{print $3}')" | ||
|
||
echo "$AWS_JDBC_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.