2017-11-09 13:28:30 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
NEW_VERSION=$1
|
|
|
|
|
2023-09-27 09:25:45 +00:00
|
|
|
# Convert NPM version to semver compatible if needed
|
|
|
|
if [[ $NEW_VERSION =~ [0-9]+.[0-9]+.[0-9]+.[a-z] ]]; then
|
|
|
|
NEW_NPM_VERSION=$(echo $NEW_VERSION | awk -F '.' '{ print $1"."$2"."$3"+"$4 }')
|
|
|
|
else
|
|
|
|
NEW_NPM_VERSION=$NEW_VERSION
|
|
|
|
fi
|
|
|
|
|
2023-02-15 15:31:48 +00:00
|
|
|
# Maven
|
2024-06-03 13:45:39 +00:00
|
|
|
./mvnw versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=*
|
|
|
|
./mvnw versions:set-property --non-recursive -Dproperty=project.version.npm -DnewVersion="$NEW_NPM_VERSION"
|
2022-02-01 08:42:09 +00:00
|
|
|
|
2023-02-15 15:31:48 +00:00
|
|
|
# Docker
|
|
|
|
sed -i "s/ENV KEYCLOAK_VERSION .*/ENV KEYCLOAK_VERSION $NEW_VERSION/" quarkus/container/Dockerfile
|
|
|
|
|
2023-04-19 07:32:46 +00:00
|
|
|
# Documentation
|
|
|
|
cd docs/documentation
|
2023-04-20 07:07:05 +00:00
|
|
|
SHORT_VERSION=`echo $NEW_VERSION | awk -F '.' '{ print $1"."$2 }'`
|
|
|
|
sed -i 's/:project_version: .*/:project_version: '$NEW_VERSION'/' topics/templates/document-attributes.adoc
|
|
|
|
sed -i 's/:project_versionMvn: .*/:project_versionMvn: '$NEW_VERSION'/' topics/templates/document-attributes.adoc
|
2023-09-27 09:25:45 +00:00
|
|
|
sed -i 's/:project_versionNpm: .*/:project_versionNpm: '$NEW_NPM_VERSION'/' topics/templates/document-attributes.adoc
|
2023-06-08 18:11:52 +00:00
|
|
|
sed -i 's/:project_versionDoc: .*/:project_versionDoc: '$NEW_VERSION'/' topics/templates/document-attributes.adoc
|
2023-04-19 07:32:46 +00:00
|
|
|
cd -
|
|
|
|
|
2024-04-19 18:10:34 +00:00
|
|
|
# NPM publish
|
2023-09-27 09:25:45 +00:00
|
|
|
echo "$(jq '. += {"version": "'$NEW_NPM_VERSION'"}' js/libs/keycloak-js/package.json)" > js/libs/keycloak-js/package.json
|
|
|
|
echo "$(jq '. += {"version": "'$NEW_NPM_VERSION'"}' js/libs/keycloak-admin-client/package.json)" > js/libs/keycloak-admin-client/package.json
|
2024-04-19 18:10:34 +00:00
|
|
|
echo "$(jq '. += {"version": "'$NEW_NPM_VERSION'"}' js/libs/ui-shared/package.json)" > js/libs/ui-shared/package.json
|
|
|
|
echo "$(jq '. += {"version": "'$NEW_NPM_VERSION'"}' js/apps/account-ui/package.json)" > js/apps/account-ui/package.json
|
2024-08-12 13:31:25 +00:00
|
|
|
echo "$(jq '. += {"version": "'$NEW_NPM_VERSION'"}' js/apps/admin-ui/package.json)" > js/apps/admin-ui/package.json
|
2023-10-04 06:00:53 +00:00
|
|
|
|
|
|
|
echo "New Mvn Version: $NEW_VERSION" >&2
|
|
|
|
echo "New NPM Version: $NEW_NPM_VERSION" >&2
|