Skip to content
Open
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
20 changes: 15 additions & 5 deletions .github/workflows/update-smoke-test-latest-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
METADATA=$(curl -sf https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/maven-metadata.xml)
# Get all versions, filter out alpha/beta/rc, take the latest
VERSION=$(echo "$METADATA" \
| xmllint --xpath '//versions/version/text()' - 2>/dev/null \
| tr ' ' '\n' \
| grep -o '<version>[^<]*</version>' \
| sed 's/<[^>]*>//g' \
| grep -v -E '(alpha|beta|rc)' \
| sort -V \
| tail -1)
Expand All @@ -62,8 +62,8 @@ jobs:
METADATA=$(curl -sf https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml)
# Get all versions, filter out alpha/beta, take the latest
VERSION=$(echo "$METADATA" \
| xmllint --xpath '//versions/version/text()' - 2>/dev/null \
| tr ' ' '\n' \
| grep -o '<version>[^<]*</version>' \
| sed 's/<[^>]*>//g' \
| grep -v -E '(alpha|beta)' \
| sort -V \
| tail -1)
Expand All @@ -80,6 +80,11 @@ jobs:
MAVEN_VERSION: ${{ steps.maven.outputs.version }}
SUREFIRE_VERSION: ${{ steps.surefire.outputs.version }}
run: |
echo "Writing resolved versions to properties files:"
echo " Gradle: ${GRADLE_VERSION}"
echo " Maven: ${MAVEN_VERSION}"
echo " Maven Surefire: ${SUREFIRE_VERSION}"

printf '%s\n' \
"# Pinned \"latest\" versions for CI Visibility Gradle smoke tests." \
"# Updated automatically by the update-smoke-test-latest-versions workflow." \
Expand All @@ -97,9 +102,14 @@ jobs:
id: check-changes
run: |
if [[ -z "$(git status -s)" ]]; then
echo "No changes to commit."
echo "No changes detected — pinned versions are already up to date."
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
echo "Changes detected in the following files:"
git status -s
echo ""
echo "Diff:"
git diff
echo "has_changes=true" >> "$GITHUB_OUTPUT"
fi

Expand Down
Loading