Commit 29206ac
committed
fix(rust): use ERE-compatible regex in start_release.sh version check
The version check used the PCRE escape \d in an egrep pattern:
REGEX_VERSION='^\d+\.\d+\.\d+$'
MATCHES=$(echo "$1" | egrep $REGEX_VERSION | wc -l)
egrep uses POSIX Extended Regular Expressions, which do not support \d.
The pattern therefore matched nothing, every input was treated as
invalid, and the script always exited with:
Version "X.Y.Z" must be N.N.N
This caused the 'Run start_release.sh and open a release PR' job to fail
with exit code 1 even though VERSION=1.3.0 had already passed the
workflow's own pre-check (which uses bash regex ^[0-9]+\.[0-9]+\.[0-9]+$).
Replace \d with [0-9] so the regex actually matches N.N.N, and quote the
variable expansion in egrep for safety.1 parent 4567535 commit 29206ac
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
0 commit comments