File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 47
47
ESCAPED_GROUP_ID=$( echo " $GROUP_ID " | sed ' s/\./\\./g' )
48
48
49
49
# Create the pattern to match
50
- PATTERN=" \" $ESCAPED_GROUP_ID :$ARTIFACT_ID :[0-9][0-9]* \.[0-9][0-9]*\.[0-9][0-9]* \" "
50
+ PATTERN=" \" $ESCAPED_GROUP_ID :$ARTIFACT_ID :[0-9]+( \.[0-9]+){0,2} \" "
51
51
52
52
# Create the replacement string
53
53
REPLACEMENT=" \" $GROUP_ID :$ARTIFACT_ID :$VERSION \" "
54
54
55
55
# Check if the pattern exists in the file
56
- if ! grep -q " $GROUP_ID :$ARTIFACT_ID :[0-9][0-9]* \.[0-9][0-9]*\.[0-9][0-9]* " README.md; then
56
+ if ! grep -Eq " $GROUP_ID :$ARTIFACT_ID :[0-9]+( \.[0-9]+){0,2} " README.md; then
57
57
echo " Error: Dependency pattern not found in README.md"
58
58
exit 1
59
59
fi
60
60
61
61
# Perform the replacement and save to a temporary file
62
- sed " s|$PATTERN |$REPLACEMENT |g" README.md > README.md.tmp
62
+ sed -E " s|$PATTERN |$REPLACEMENT |g" README.md > README.md.tmp
63
63
64
64
# Check if sed made any changes
65
65
if cmp -s README.md README.md.tmp; then
You can’t perform that action at this time.
0 commit comments