4444 METADATA=$(curl -sf https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml)
4545 # Get all versions, filter out alpha/beta/rc, take the latest
4646 VERSION=$(echo "$METADATA" \
47- | xmllint --xpath '//versions/ version/text()' - 2>/dev/null \
48- | tr ' ' '\n ' \
47+ | grep -o '< version>[^<]*</version>' \
48+ | sed 's/<[^>]*>//g ' \
4949 | grep -v -E '(alpha|beta|rc)' \
5050 | sort -V \
5151 | tail -1)
6262 METADATA=$(curl -sf https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml)
6363 # Get all versions, filter out alpha/beta, take the latest
6464 VERSION=$(echo "$METADATA" \
65- | xmllint --xpath '//versions/ version/text()' - 2>/dev/null \
66- | tr ' ' '\n ' \
65+ | grep -o '< version>[^<]*</version>' \
66+ | sed 's/<[^>]*>//g ' \
6767 | grep -v -E '(alpha|beta)' \
6868 | sort -V \
6969 | tail -1)
8080 MAVEN_VERSION : ${{ steps.maven.outputs.version }}
8181 SUREFIRE_VERSION : ${{ steps.surefire.outputs.version }}
8282 run : |
83+ echo "Writing resolved versions to properties files:"
84+ echo " Gradle: ${GRADLE_VERSION}"
85+ echo " Maven: ${MAVEN_VERSION}"
86+ echo " Maven Surefire: ${SUREFIRE_VERSION}"
87+
8388 printf '%s\n' \
8489 "# Pinned \"latest\" versions for CI Visibility Gradle smoke tests." \
8590 "# Updated automatically by the update-smoke-test-latest-versions workflow." \
@@ -97,9 +102,14 @@ jobs:
97102 id : check-changes
98103 run : |
99104 if [[ -z "$(git status -s)" ]]; then
100- echo "No changes to commit ."
105+ echo "No changes detected — pinned versions are already up to date ."
101106 echo "has_changes=false" >> "$GITHUB_OUTPUT"
102107 else
108+ echo "Changes detected in the following files:"
109+ git status -s
110+ echo ""
111+ echo "Diff:"
112+ git diff
103113 echo "has_changes=true" >> "$GITHUB_OUTPUT"
104114 fi
105115
0 commit comments