Make bash scripts exit on error rather than continue (#23467)
This commit is contained in:
parent
0e8e472138
commit
341b0b469e
6 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# If $1 looks like v1.2.3 or v1.2.3-foo, strip the leading v, then print it to stdout
|
||||
if [[ $1 =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
|
||||
echo ${1:1}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue