This directory contains automation scripts used by GitHub Actions workflows.
Updates version numbers in documentation examples during the release process.
Purpose: Ensures that version numbers in README.md dependency examples always match the current release version.
Usage:
# With explicit version (recommended during release)
bash .github/scripts/update-example-versions.sh "1.2.0"
# Without version argument (extracts from pom.xml)
bash .github/scripts/update-example-versions.shWhat it does:
- Accepts an optional version argument (recommended to avoid confusion after release:prepare)
- If no argument, extracts the current version from the root
pom.xml(skipping parent version) and strips-SNAPSHOTsuffix - Updates all
<version>tags within<dependency>blocks in README.md - Reports changes made via git diff
Test script for update-example-versions.sh. This is not part of the Java test suite.
Usage:
# Run tests
bash .github/scripts/test-update-example-versions.shTests included:
- Version extraction from pom.xml
- SNAPSHOT suffix stripping
- Script accepts version argument
- Full script execution
- Version pattern matching (sed patterns)
- Selective replacement (only updates dependency blocks)
- Error handling (missing files)
Exit codes:
0: All tests passed1: One or more tests failed