Skip to content

Commit 89be8e7

Browse files
brunoborgesCopilot
andcommitted
Fix stale snapshot version in README and automate updates
Update the snapshot version in README.md from 0.2.1-java.0-SNAPSHOT to 0.2.3-java.1-SNAPSHOT to match the current pom.xml. Add a sed command to the publish-maven workflow to update the snapshot version during releases, preventing it from going stale again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a1c3bdd commit 89be8e7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/publish-maven.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ jobs:
121121
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\.[0-9][0-9]*\)\{0,1\}</version>|<version>${VERSION}</version>|g" README.md
122122
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" README.md
123123
124+
# Update snapshot version in README.md
125+
DEV_VERSION="${{ steps.versions.outputs.dev_version }}"
126+
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\.[0-9][0-9]*\)\{0,1\}-SNAPSHOT</version>|<version>${DEV_VERSION}</version>|g" README.md
127+
124128
# Update version in jbang-example.java
125129
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" jbang-example.java
126130

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Snapshot builds of the next development version are published to Maven Central S
5353
<dependency>
5454
<groupId>com.github</groupId>
5555
<artifactId>copilot-sdk-java</artifactId>
56-
<version>0.2.1-java.0-SNAPSHOT</version>
56+
<version>0.2.3-java.1-SNAPSHOT</version>
5757
</dependency>
5858
```
5959

0 commit comments

Comments
 (0)