Skip to content

Commit c9954b0

Browse files
committed
Apply a few minor update.sh consistency tweaks and use it to update 3.6/stretch to 3.6.2
1 parent d8cda13 commit c9954b0

File tree

3 files changed

+28
-30
lines changed

3 files changed

+28
-30
lines changed

2.7/stretch/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ RUN set -ex \
4848
\
4949
&& find /usr/local -depth \
5050
\( \
51-
\( -type d -a -name test -o -name tests \) \
51+
\( -type d -a \( -name test -o -name tests \) \) \
5252
-o \
53-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
53+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
5454
\) -exec rm -rf '{}' + \
5555
&& rm -rf /usr/src/python
5656

@@ -70,9 +70,9 @@ RUN set -ex; \
7070
\
7171
find /usr/local -depth \
7272
\( \
73-
\( -type d -a -name test -o -name tests \) \
73+
\( -type d -a \( -name test -o -name tests \) \) \
7474
-o \
75-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
75+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
7676
\) -exec rm -rf '{}' +; \
7777
rm -f get-pip.py
7878

3.6/stretch/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2020
&& rm -rf /var/lib/apt/lists/*
2121

2222
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
23-
ENV PYTHON_VERSION 3.6.1
23+
ENV PYTHON_VERSION 3.6.2
2424

2525
RUN set -ex \
2626
&& buildDeps=' \
@@ -57,9 +57,9 @@ RUN set -ex \
5757
\
5858
&& find /usr/local -depth \
5959
\( \
60-
\( -type d -a -name test -o -name tests \) \
60+
\( -type d -a \( -name test -o -name tests \) \) \
6161
-o \
62-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
62+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
6363
\) -exec rm -rf '{}' + \
6464
&& rm -rf /usr/src/python
6565

@@ -86,9 +86,9 @@ RUN set -ex; \
8686
\
8787
find /usr/local -depth \
8888
\( \
89-
\( -type d -a -name test -o -name tests \) \
89+
\( -type d -a \( -name test -o -name tests \) \) \
9090
-o \
91-
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
91+
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
9292
\) -exec rm -rf '{}' +; \
9393
rm -f get-pip.py
9494

update.sh

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,6 @@ for version in "${versions[@]}"; do
9999
template="Dockerfile-$variant.template"
100100
{ generated_warning; cat "$template"; } > "$dir/Dockerfile"
101101
done
102-
if [ -d "$version/wheezy" ]; then
103-
cp "$version/Dockerfile" "$version/wheezy/Dockerfile"
104-
# wheezy-only: dpkg-architecture: unknown option `--query'
105-
sed -ri \
106-
-e 's/:jessie/:wheezy/g' \
107-
-e 's/dpkg-architecture --query /dpkg-architecture -q/g' \
108-
"$version/wheezy/Dockerfile"
109-
fi
110102
fi
111103
(
112104
set -x
@@ -119,21 +111,27 @@ for version in "${versions[@]}"; do
119111
"$version"/{,*/,*/*/}Dockerfile
120112
)
121113
fi
122-
if [ -d "$version/alpine3.6" ]; then
123-
cp "$version/alpine/Dockerfile" "$version/alpine3.6/Dockerfile"
124-
sed -ri \
125-
-e 's/(alpine):3.4/\1:3.6/g' \
126-
-e 's/openssl/libressl/g' \
127-
"$version/alpine3.6/Dockerfile"
128-
fi
129-
if [ -d "$version/stretch" ]; then
130-
cp "$version/Dockerfile" "$version/stretch/Dockerfile"
131-
sed -ri \
132-
-e 's/:jessie/:stretch/g' \
133-
"$version/stretch/Dockerfile"
134-
fi
135114
for variant in wheezy stretch alpine3.6 alpine slim ''; do
136115
[ -d "$version/$variant" ] || continue
116+
117+
case "$variant" in
118+
alpine3.6)
119+
sed -r \
120+
-e 's!(alpine):3.4!\1:3.6!g' \
121+
-e 's!openssl!libressl!g' \
122+
"$version/alpine/Dockerfile" > "$version/$variant/Dockerfile"
123+
;;
124+
125+
wheezy|stretch)
126+
sed -r \
127+
-e "s!(buildpack-deps|debian):jessie!\1:${variant}!g" \
128+
"$version/Dockerfile" > "$version/$variant/Dockerfile"
129+
if [ "$variant" = 'wheezy' ]; then
130+
sed -ri -e 's/dpkg-architecture --query /dpkg-architecture -q/g' "$version/$variant/Dockerfile"
131+
fi
132+
;;
133+
esac
134+
137135
travisEnv='\n - VERSION='"$version VARIANT=$variant$travisEnv"
138136
done
139137
for winVariant in windowsservercore nanoserver; do

0 commit comments

Comments
 (0)