File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -o errexit -o nounset -o pipefail
3
3
4
+ _sed () {
5
+ if sed --version; then
6
+ # GNU sed
7
+ sed --regexp-extended --in-place " $@ "
8
+ else
9
+ # BSD sed
10
+ sed -Ei ' ' " $@ "
11
+ fi
12
+ }
13
+
4
14
groovyVersion=$( curl -s ' https://api.github.com/repos/apache/groovy/tags' | grep -Eo ' GROOVY_4.[0-9]{1,2}.[0-9]{1,2}' | head -n 1 | sed -e ' s/GROOVY_//' -e ' s/_/./g' )
5
15
echo " Updating to Groovy $groovyVersion "
6
16
7
- sed --regexp-extended --in-place " s/ENV GROOVY_VERSION=.+/ENV GROOVY_VERSION=${groovyVersion} /" ./* /Dockerfile
8
- sed --regexp-extended --in-place " s/expectedGroovyVersion: .+$/expectedGroovyVersion: ${groovyVersion} /" .github/workflows/ci.yaml
17
+ _sed " s/ENV GROOVY_VERSION=.+/ENV GROOVY_VERSION=${groovyVersion} /" ./* /Dockerfile
18
+ _sed " s/expectedGroovyVersion: .+$/expectedGroovyVersion: ${groovyVersion} /" .github/workflows/ci.yaml
You can’t perform that action at this time.
0 commit comments