Skip to content

Commit db410b3

Browse files
authored
Merge pull request #105 from groovy/replace-legacy-style
Replace legacy style env vars
2 parents 66d9d80 + e8413f8 commit db410b3

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

jdk11-alpine/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:11-jdk-alpine
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -19,7 +19,7 @@ VOLUME /home/groovy/.groovy/grapes
1919

2020
WORKDIR /home/groovy
2121

22-
ENV GROOVY_VERSION 4.0.22
22+
ENV GROOVY_VERSION=4.0.22
2323
RUN set -o errexit -o nounset \
2424
&& echo "Installing build dependencies" \
2525
&& apk add --no-cache --virtual .build-deps \

jdk11/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:11-jdk-jammy
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
2929
wget \
3030
&& rm --recursive --force /var/lib/apt/lists/*
3131

32-
ENV GROOVY_VERSION 4.0.22
32+
ENV GROOVY_VERSION=4.0.22
3333
RUN set -o errexit -o nounset \
3434
&& echo "Downloading Groovy" \
3535
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \

jdk17-alpine/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:17-jdk-alpine
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -19,7 +19,7 @@ VOLUME /home/groovy/.groovy/grapes
1919

2020
WORKDIR /home/groovy
2121

22-
ENV GROOVY_VERSION 4.0.22
22+
ENV GROOVY_VERSION=4.0.22
2323
RUN set -o errexit -o nounset \
2424
&& echo "Installing build dependencies" \
2525
&& apk add --no-cache --virtual .build-deps \

jdk17/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:17-jdk-jammy
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
2929
wget \
3030
&& rm --recursive --force /var/lib/apt/lists/*
3131

32-
ENV GROOVY_VERSION 4.0.22
32+
ENV GROOVY_VERSION=4.0.22
3333
RUN set -o errexit -o nounset \
3434
&& echo "Downloading Groovy" \
3535
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \

jdk21-alpine/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:21-jdk-alpine
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -19,7 +19,7 @@ VOLUME /home/groovy/.groovy/grapes
1919

2020
WORKDIR /home/groovy
2121

22-
ENV GROOVY_VERSION 4.0.22
22+
ENV GROOVY_VERSION=4.0.22
2323
RUN set -o errexit -o nounset \
2424
&& echo "Installing build dependencies" \
2525
&& apk add --no-cache --virtual .build-deps \

jdk21/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:21-jdk-jammy
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
2929
wget \
3030
&& rm --recursive --force /var/lib/apt/lists/*
3131

32-
ENV GROOVY_VERSION 4.0.22
32+
ENV GROOVY_VERSION=4.0.22
3333
RUN set -o errexit -o nounset \
3434
&& echo "Downloading Groovy" \
3535
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \

jdk8/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM eclipse-temurin:8-jdk-jammy
22

33
CMD ["groovysh"]
44

5-
ENV GROOVY_HOME /opt/groovy
5+
ENV GROOVY_HOME=/opt/groovy
66

77
RUN set -o errexit -o nounset \
88
&& echo "Adding groovy user and group" \
@@ -29,7 +29,7 @@ RUN set -o errexit -o nounset \
2929
wget \
3030
&& rm --recursive --force /var/lib/apt/lists/*
3131

32-
ENV GROOVY_VERSION 4.0.22
32+
ENV GROOVY_VERSION=4.0.22
3333
RUN set -o errexit -o nounset \
3434
&& echo "Downloading Groovy" \
3535
&& wget --no-verbose --output-document=groovy.zip "https://archive.apache.org/dist/groovy/${GROOVY_VERSION}/distribution/apache-groovy-binary-${GROOVY_VERSION}.zip" \

update.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ $groovyVersion = $(((Invoke-WebRequest "https://api.github.com/repos/apache/groo
33
Write-Host "Updating to Groovy $groovyVersion"
44

55
dir -Recurse -Filter Dockerfile | ForEach-Object {
6-
(Get-Content -Path $_.FullName) -replace "ENV GROOVY_VERSION .+", "ENV GROOVY_VERSION ${groovyVersion}" | Set-Content $_.FullName
6+
(Get-Content -Path $_.FullName) -replace "ENV GROOVY_VERSION=.+", "ENV GROOVY_VERSION=${groovyVersion}" | Set-Content $_.FullName
77
}
88
(Get-Content -Path .github/workflows/ci.yaml) -replace "expectedGroovyVersion: .+", "expectedGroovyVersion: ${groovyVersion}" | Set-Content .github/workflows/ci.yaml

update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -o errexit -o nounset -o pipefail
44
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')
55
echo "Updating to Groovy $groovyVersion"
66

7-
sed --regexp-extended --in-place "s/ENV GROOVY_VERSION .+/ENV GROOVY_VERSION ${groovyVersion}/" ./*/Dockerfile
7+
sed --regexp-extended --in-place "s/ENV GROOVY_VERSION=.+/ENV GROOVY_VERSION=${groovyVersion}/" ./*/Dockerfile
88
sed --regexp-extended --in-place "s/expectedGroovyVersion: .+$/expectedGroovyVersion: ${groovyVersion}/" .github/workflows/ci.yaml

0 commit comments

Comments
 (0)