forked from graphql-java-kickstart/graphql-java-servlet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '15.2' into 15.2Onepiece
* 15.2: (72 commits) Update version for release chore: bump version to 15.2.0 fix(deps): update all non-major dependencies to v2.0.12 chore(deps): update dependency gradle to v8.6 (graphql-java-kickstart#554) chore(deps): update gradle/wrapper-validation-action action to v2 chore(deps): update actions/cache action to v4 (graphql-java-kickstart#551) fix(deps): update dependency org.apache.groovy:groovy-all to v4.0.18 fix(deps): update all non-major dependencies to v6.1.3 fix(deps): update all non-major dependencies to v2.0.11 fix(deps): update all non-major dependencies to v2.0.10 fix(deps): update all non-major dependencies to v2.16.1 fix(deps): update dependency org.apache.groovy:groovy-all to v4.0.17 (graphql-java-kickstart#545) fix(deps): update dependency net.bytebuddy:byte-buddy to v1.14.11 fix(deps): update dependency com.google.guava:guava to v33 (graphql-java-kickstart#542) fix(deps): update all non-major dependencies (graphql-java-kickstart#533) chore(deps): replace cglib with byte-buddy (graphql-java-kickstart#543) chore(deps): update actions/setup-java action to v4 chore(deps): update actions/checkout action to v4 fix(deps): update dependency com.graphql-java:graphql-java to v21 fix(deps): update all non-major dependencies to v2.1.1 ... # Conflicts: # build.gradle # gradle.properties
- Loading branch information
Showing
26 changed files
with
435 additions
and
116 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,37 @@ | ||
#!/bin/bash | ||
|
||
addSuffix() { | ||
local result | ||
result=$(grep include settings.gradle | awk '{print $2}' | tr -d "'" | tr -d ':') | ||
readarray -t <<<"$result" | ||
modules=("${MAPFILE[@]}") | ||
|
||
updateLocalDependencies | ||
} | ||
|
||
updateLocalDependencies() { | ||
for module in "${modules[@]}"; do | ||
cp -rf "$module" "$module"-javax | ||
rm -rf "$module" | ||
|
||
for dependency in "${modules[@]}"; do | ||
sed -i -E "s/project\(('|\"):${dependency}('|\")\)/project\(':${dependency}-javax'\)/" "$module"-"javax"/build.gradle | ||
done | ||
done | ||
|
||
updateGradleSettings | ||
} | ||
|
||
updateGradleSettings() { | ||
for module in "${modules[@]}"; do | ||
echo "Replace ${module} with ${module}-javax in settings.gradle" | ||
sed -i -E "s/('|\"):${module}('|\")/':${module}-javax'/" settings.gradle | ||
done | ||
|
||
cat settings.gradle | ||
} | ||
|
||
echo "Add suffix -javax to modules" | ||
addSuffix | ||
|
||
ls -lh |
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,17 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
FLAVOUR="${1}" | ||
|
||
removeSnapshots() { | ||
sed -i 's/-SNAPSHOT//' gradle.properties | ||
} | ||
|
||
echo "Publishing release to Maven Central" | ||
removeSnapshots | ||
|
||
if [ "${FLAVOUR}" == 'javax' ]; then | ||
.github/add-javax-suffix.sh | ||
fi | ||
|
||
./gradlew clean build publishToSonatype closeAndReleaseSonatypeStagingRepository |
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,28 @@ | ||
#!/bin/bash | ||
|
||
# Set jdk11 as source and target | ||
sed -i 's/SOURCE_COMPATIBILITY=.*/SOURCE_COMPATIBILITY=11/' gradle.properties | ||
sed -i 's/TARGET_COMPATIBILITY=.*/TARGET_COMPATIBILITY=11/' gradle.properties | ||
|
||
# Replace jakarta imports and dependencies with javax | ||
grep -rl 'import jakarta' ./graphql-java-servlet | xargs sed -i 's/import jakarta/import javax/g' | ||
sed -i 's/.*jakarta.websocket:jakarta.websocket-client-api.*//' graphql-java-servlet/build.gradle | ||
sed -i \ | ||
's/jakarta.servlet:jakarta.servlet-api.*/javax.servlet:javax.servlet-api:$LIB_JAVAX_SERVLET"/' \ | ||
graphql-java-servlet/build.gradle | ||
sed -i \ | ||
's/jakarta.websocket.*/javax.websocket:javax.websocket-api:$LIB_JAVAX_WEBSOCKET"/' \ | ||
graphql-java-servlet/build.gradle | ||
|
||
# Final check if there are something else to replace | ||
grep -rl 'jakarta' ./graphql-java-servlet | xargs sed -i 's/jakarta/javax/g' | ||
|
||
# Set the version 5 for spring framework | ||
sed -i \ | ||
's/org.springframework:spring-test.*/org.springframework:spring-test:$LIB_SPRINGFRAMEWORK_5"/' \ | ||
graphql-java-servlet/build.gradle | ||
sed -i \ | ||
's/org.springframework:spring-web.*/org.springframework:spring-web:$LIB_SPRINGFRAMEWORK_5"/' \ | ||
graphql-java-servlet/build.gradle | ||
|
||
echo "Replaced jakarta occurrences with javax" |
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 |
---|---|---|
|
@@ -10,14 +10,16 @@ removeSnapshots() { | |
} | ||
|
||
commitRelease() { | ||
local APP_VERSION=$(getVersion) | ||
local APP_VERSION | ||
APP_VERSION=$(getVersion) | ||
git commit -a -m "Update version for release" | ||
git tag -a "v${APP_VERSION}" -m "Tag release version" | ||
} | ||
|
||
bumpVersion() { | ||
echo "Bump version number" | ||
local APP_VERSION=$(getVersion | xargs) | ||
local APP_VERSION | ||
APP_VERSION=$(getVersion | xargs) | ||
local SEMANTIC_REGEX='^([0-9]+)\.([0-9]+)(\.([0-9]+))?$' | ||
if [[ ${APP_VERSION} =~ ${SEMANTIC_REGEX} ]]; then | ||
if [[ ${BASH_REMATCH[4]} ]]; then | ||
|
@@ -30,24 +32,17 @@ bumpVersion() { | |
|
||
echo "Next version: ${nextVersion}" | ||
sed -i -E "s/^version(\s)?=.*/version=${nextVersion}/" gradle.properties | ||
git commit -a -m "Bumped version for next release" | ||
else | ||
echo "No semantic version and therefore cannot publish to maven repository: '${APP_VERSION}'" | ||
fi | ||
} | ||
|
||
commitNextVersion() { | ||
git commit -a -m "Update version for release" | ||
} | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
|
||
echo "Deploying release to Maven Central" | ||
removeSnapshots | ||
|
||
./gradlew clean build publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
|
||
commitRelease | ||
bumpVersion | ||
commitNextVersion | ||
git push --follow-tags | ||
git push --follow-tags |
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
Oops, something went wrong.