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
Browse filesBrowse the repository at this point in the historyBrowse files
j-zhangyiyuan
committed
fix: Java README version stuck at 1.0.5-01; release sed regex can't match numeric qualifiers
The qualifier group \(-[a-z]...)\ requires qualifiers to start with a
letter. Numeric-only qualifiers like \-01\ don't match, so the Maven
snippet was never updated past 1.0.5-01.
Fix the regex to accept any alphanumeric qualifier start character:
\(-[a-zA-Z0-9][a-zA-Z0-9.-]*)\
Also update the stale README versions to 1.0.6 (latest release).
Closes#2209
# Update release version in README.md (supports any version qualifier like -java.N, -java-preview.N, -beta-java.N)
204
-
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*</version>|<version>${VERSION}</version>|g" README.md
205
-
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" README.md
203
+
# Update release version in README.md (matches alpha qualifiers like -preview.2 and numeric like -01, but not -SNAPSHOT)
204
+
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\|-[0-9][0-9]*\)*</version>|<version>${VERSION}</version>|g" README.md
205
+
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\|-[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" README.md
206
206
207
207
# Update snapshot versions in README.md (must run AFTER release version seds
208
208
# because the release copilot-sdk-java: pattern partially matches inside snapshot
209
209
# strings — the snapshot-specific seds override with the correct DEV_VERSION)
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*-SNAPSHOT</version>|<version>${DEV_VERSION}</version>|g" README.md
212
-
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*-SNAPSHOT|copilot-sdk-java:${DEV_VERSION}|g" README.md
211
+
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\|-[0-9][0-9]*\)*-SNAPSHOT</version>|<version>${DEV_VERSION}</version>|g" README.md
212
+
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\|-[0-9][0-9]*\)*-SNAPSHOT|copilot-sdk-java:${DEV_VERSION}|g" README.md
213
213
214
214
# Update version in jbang-example.java
215
-
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" jbang-example.java
215
+
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\|-[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" jbang-example.java
216
216
sed -i 's|copilot-sdk-java:${project\.version}|copilot-sdk-java:'"${VERSION}"'|g' jbang-example.java
217
217
218
218
# Commit the documentation changes before release:prepare (requires clean working directory)
0 commit comments