You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Development commit: `[maven-release-plugin] prepare for next development iteration`
112
123
3. Verify the GitHub Release was published at the [Releases page](https://github.com/BerryCloud/xapi-java/releases)
113
124
- The release should no longer be in draft state
114
125
- JAR artifacts should be attached to the release
115
-
4. Verify artifacts are available on [Maven Central](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-model)
126
+
4. Verify documentation examples were updated:
127
+
- Check that README.md contains the correct version in dependency examples
128
+
- The version should match the release version (e.g., 1.2.0)
129
+
5. Verify artifacts are available on [Maven Central](https://central.sonatype.com/artifact/dev.learning.xapi/xapi-model)
116
130
- Note: It may take up to 2 hours for artifacts to sync to Maven Central
117
131
118
132
## Manual Draft Release Benefits
@@ -125,6 +139,7 @@ The manual draft release approach provides several advantages:
125
139
-**Release Notes**: Prepare release notes in advance as part of the draft
126
140
-**Artifact Attachment**: Release artifacts (JARs) are automatically uploaded to the GitHub Release
127
141
-**Coordination**: Coordinate releases with code reviews and team schedules
142
+
-**Automated Documentation**: Version numbers in documentation examples are automatically updated to match the release version
128
143
129
144
## Release Branch Strategy
130
145
@@ -138,6 +153,40 @@ The manual draft release approach provides several advantages:
138
153
- Used for reproducible builds and deployments
139
154
-**No separate release branches**: The release workflow pushes directly to the selected branch
140
155
156
+
## Automated Documentation Version Updates
157
+
158
+
The release workflow automatically updates version numbers in documentation examples to match the release version. This ensures users always see correct, up-to-date version numbers when copying examples from the documentation.
159
+
160
+
### What Gets Updated
161
+
162
+
The automation updates version numbers in:
163
+
-**README.md**: All Maven dependency examples for xapi-client, xapi-model, and xapi-model-spring-boot-starter
164
+
165
+
### How It Works
166
+
167
+
1. After Maven release:prepare completes, a script (`.github/scripts/update-example-versions.sh`) runs automatically
168
+
2. The script extracts the release version from the root `pom.xml`
169
+
3. It updates all `<version>X.Y.Z</version>` tags within dependency blocks in README.md
170
+
4. The changes are added to the release commit (amending the commit created by release:prepare)
171
+
5. The release tag is updated to point to the amended commit
172
+
173
+
### Benefits
174
+
175
+
-**No manual updates needed**: Version numbers are updated automatically during release
176
+
-**Always accurate**: Documentation examples always reference the current release version
177
+
-**Transparent**: Changes appear in the release commit and are visible in pull requests
178
+
-**Single source of truth**: Uses Maven's version from pom.xml as the authoritative source
179
+
180
+
### Maintenance
181
+
182
+
The script uses simple pattern matching to find and replace version numbers. If new files need to be updated:
0 commit comments