Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix update.sh to not mistakenly capture RCs (and thus push 3.4 down to 3.4.1, since 3.4.2 isn't actually out yet) #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /usr/src/python
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

ENV PYTHON_VERSION 3.4.2
ENV PYTHON_VERSION 3.4.1

RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
| tar -xJ --strip-components=1
Expand Down
2 changes: 1 addition & 1 deletion 3.4/onbuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.4.2
FROM python:3.4.1

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand Down
4 changes: 3 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ fi
versions=( "${versions[@]%/}" )

for version in "${versions[@]}"; do
fullVersion="$(curl -sSL 'https://www.python.org/ftp/python/' | grep '<a href="'"$version." | sed -r 's!.*<a href="([^"/]+)/?".*!\1!' | sort -V | tail -1)"
# <span class="release-number"><a href="/downloads/release/python-278/">Python 2.7.8</a></span>
# <span class="release-number"><a href="/downloads/release/python-341/">Python 3.4.1</a></span>
fullVersion="$(curl -sSL 'https://www.python.org/downloads/' | awk -F 'Python |</a>' '/<span class="release-number"><a[^>]+>Python '"$version"'./ { print $2 }' | sort -V | tail -1)"
(
set -x
sed -ri 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' "$version/Dockerfile"
Expand Down