Skip to content

Commit 21e67e5

Browse files
stefanbotezStefan Botez
and
Stefan Botez
authored
Revise fetching latest patch version of python (#9)
Co-authored-by: Stefan Botez <[email protected]>
1 parent f4dc1e1 commit 21e67e5

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

test/integration/docker/Dockerfile.echo.amazonlinux

+9-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ RUN yum install -y \
2323
libffi-devel \
2424
sqlite-devel
2525

26-
RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/ftp/python/ | grep -oE "href=\"$(echo ${RUNTIME_VERSION} | sed "s/\\./\\\./g")\.[0-9]+" | cut -d. -f3 | sort -n | tail -n1) \
27-
&& wget -c https://www.python.org/ftp/python/${RUNTIME_LATEST_VERSION}/Python-${RUNTIME_LATEST_VERSION}.tgz -O - | tar -xz \
26+
RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/ftp/python/ | \
27+
grep -oE "href=\"$(echo ${RUNTIME_VERSION} | sed "s/\\./\\\./g")\.[0-9]+" | \
28+
cut -d. -f3 | \
29+
sort -rn | \
30+
while read -r patch; do \
31+
$(wget -c https://www.python.org/ftp/python/${RUNTIME_VERSION}.$patch/Python-${RUNTIME_VERSION}.$patch.tgz -O Python-${RUNTIME_VERSION}.$patch.tgz); \
32+
[ $? -eq 0 ] && echo $patch && break; \
33+
done) \
34+
&& tar -xzf Python-${RUNTIME_LATEST_VERSION}.tgz \
2835
&& cd Python-${RUNTIME_LATEST_VERSION} \
2936
&& ./configure --prefix=/usr/local --enable-shared \
3037
&& make \

test/integration/docker/Dockerfile.echo.centos

+9-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ RUN yum install -y \
2323
libffi-devel \
2424
sqlite-devel
2525

26-
RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/ftp/python/ | grep -oE "href=\"$(echo ${RUNTIME_VERSION} | sed "s/\\./\\\./g")\.[0-9]+" | cut -d. -f3 | sort -n | tail -n1) \
27-
&& wget -c https://www.python.org/ftp/python/${RUNTIME_LATEST_VERSION}/Python-${RUNTIME_LATEST_VERSION}.tgz -O - | tar -xz \
26+
RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/ftp/python/ | \
27+
grep -oE "href=\"$(echo ${RUNTIME_VERSION} | sed "s/\\./\\\./g")\.[0-9]+" | \
28+
cut -d. -f3 | \
29+
sort -rn | \
30+
while read -r patch; do \
31+
$(wget -c https://www.python.org/ftp/python/${RUNTIME_VERSION}.$patch/Python-${RUNTIME_VERSION}.$patch.tgz -O Python-${RUNTIME_VERSION}.$patch.tgz); \
32+
[ $? -eq 0 ] && echo $patch && break; \
33+
done) \
34+
&& tar -xzf Python-${RUNTIME_LATEST_VERSION}.tgz \
2835
&& cd Python-${RUNTIME_LATEST_VERSION} \
2936
&& ./configure --prefix=/usr/local --enable-shared \
3037
&& make \

0 commit comments

Comments
 (0)