Skip to content

Commit f7b9e3e

Browse files
Heiko KieselWeltraumschaf
authored andcommitted
Use preciser regular expressions
Signed-off-by: Heiko Kiesel <heiko.kiesel@iteratec.com>
1 parent 38af964 commit f7b9e3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ jobs:
8989
MVN_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
9090
echo "MVN_VERSION=$MVN_VERSION" >> $GITHUB_OUTPUT
9191
92-
# Replaced all version occurrences in README.md (e.g., 1.0.0, 1.0.0-SNAPSHOT, and 1.0.0-beta3)
92+
# Replaced all version occurrences in README.md in the form: <version>1.0.0</version> or version: '1.0.0'
93+
# A version can be 1.0.0, 1.0.0-SNAPSHOT, or 1.0.0-beta4
9394
- name: "Change README"
9495
run: |
95-
sed -i -e 's/[0-9].[0-9].[0-9]\(-[A-z0-9]*\)*/${{ steps.extract-version.outputs.MVN_VERSION }}/g' README.md
96+
sed -i -e "s@\(<version>\)\([0-9].[0-9].[0-9]\(-[A-z0-9]*\)*\)\(</version>\)@\1${{ steps.extract-version.outputs.MVN_VERSION }}\4@g" README.md
97+
sed -i -e "s@\(version: '\)\([0-9].[0-9].[0-9]\(-[A-z0-9]*\)*\)\('\)@\1${{ steps.extract-version.outputs.MVN_VERSION }}\4@g" README.md
9698
git add README.md
9799
git commit -S -m "Update version in README"
98100
git push

0 commit comments

Comments
 (0)