Update to 0.6.4 and make supported architectures list more fluid/dynamic (based on available published binaries)

Closes #19
This commit is contained in:
Tianon Gravi 2018-07-24 12:43:07 -07:00
parent 3854279e1f
commit d3bfa97a8d
8 changed files with 29 additions and 23 deletions

View File

@ -17,6 +17,12 @@ hasBashbrewArch() {
_awkArch "$version" 'BEGIN { exitCode = 1 } $1 == bashbrewArch { exitCode = 0 } END { exit exitCode }' -v bashbrewArch="$bashbrewArch" _awkArch "$version" 'BEGIN { exitCode = 1 } $1 == bashbrewArch { exitCode = 0 } END { exit exitCode }' -v bashbrewArch="$bashbrewArch"
} }
dpkgToBashbrewArch() {
local version="$1"; shift
local dpkgArch="$1"; shift
_awkArch "$version" '$2 == dpkgArch { print $1; exit }' -v dpkgArch="$dpkgArch"
}
dpkgToJuliaTarArch() { dpkgToJuliaTarArch() {
local version="$1"; shift local version="$1"; shift
local dpkgArch="$1"; shift local dpkgArch="$1"; shift

View File

@ -55,7 +55,7 @@ parentArches() {
local arches=() local arches=()
for arch in $parentArches; do for arch in $parentArches; do
if hasBashbrewArch "$version" "$arch"; then if hasBashbrewArch "$version" "$arch" && grep -qE "^# $arch\$" "$dir/Dockerfile"; then
arches+=( "$arch" ) arches+=( "$arch" )
fi fi
done done

View File

@ -17,7 +17,7 @@ ENV PATH $JULIA_PATH/bin:$PATH
ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495 ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495
# https://julialang.org/downloads/ # https://julialang.org/downloads/
ENV JULIA_VERSION 0.6.3 ENV JULIA_VERSION 0.6.4
RUN set -eux; \ RUN set -eux; \
\ \
@ -32,14 +32,14 @@ RUN set -eux; \
fi; \ fi; \
\ \
# https://julialang.org/downloads/#julia-command-line-version # https://julialang.org/downloads/#julia-command-line-version
# https://julialang-s3.julialang.org/bin/checksums/julia-0.6.3.sha256 # https://julialang-s3.julialang.org/bin/checksums/julia-0.6.4.sha256
# this "case" statement is generated via "update.sh" # this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \ dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \ case "${dpkgArch##*-}" in \
amd64) tarArch='x86_64'; dirArch='x64'; sha256='36212ed8e1c864599e9f149d884d504eee15b57b96bf918cb5b9ac35a5ab6283' ;; \ # amd64
armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='abe9dd0cbf890a13bfe69581bf4eee100c8834bf4c0296416d20af54d80e6d9a' ;; \ amd64) tarArch='x86_64'; dirArch='x64'; sha256='d20e6984bcf8c3692d853a9922e2cf1de19b91201cb9e396d9264c32cebedc46' ;; \
arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='cdd1420fc3df0058978ccb20e2f4db47cb6d3dd164cb67ba70ee2d5c99306c47' ;; \ # i386
i386) tarArch='i686'; dirArch='x86'; sha256='3e6f2c3d0a168077ddd61383566513303b0153c56352df2dde1531eb16d79143' ;; \ i386) tarArch='i686'; dirArch='x86'; sha256='ab45280c799e63ab04da7a928fee79b43e41b457a6d4c48058798b9bad542688' ;; \
*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \ *) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \
esac; \ esac; \
\ \

View File

@ -5,6 +5,4 @@ amd64 amd64 x86_64 x64
arm32v7 armhf armv7l armv7l arm32v7 armhf armv7l armv7l
arm64v8 arm64 aarch64 aarch64 arm64v8 arm64 aarch64 aarch64
i386 i386 i686 x86 i386 i386 i686 x86
ppc64le ppc64el ppc64le ppc64le
# ppc64le appears to be "0.6.0-rc3"-only as of 2017-08-24
#ppc64le ppc64el ppc64le ppc64le

View File

@ -17,7 +17,7 @@ ENV PATH $JULIA_PATH/bin:$PATH
ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495 ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495
# https://julialang.org/downloads/ # https://julialang.org/downloads/
ENV JULIA_VERSION 0.6.3 ENV JULIA_VERSION 0.6.4
RUN set -eux; \ RUN set -eux; \
\ \
@ -32,14 +32,14 @@ RUN set -eux; \
fi; \ fi; \
\ \
# https://julialang.org/downloads/#julia-command-line-version # https://julialang.org/downloads/#julia-command-line-version
# https://julialang-s3.julialang.org/bin/checksums/julia-0.6.3.sha256 # https://julialang-s3.julialang.org/bin/checksums/julia-0.6.4.sha256
# this "case" statement is generated via "update.sh" # this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \ dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \ case "${dpkgArch##*-}" in \
amd64) tarArch='x86_64'; dirArch='x64'; sha256='36212ed8e1c864599e9f149d884d504eee15b57b96bf918cb5b9ac35a5ab6283' ;; \ # amd64
armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='abe9dd0cbf890a13bfe69581bf4eee100c8834bf4c0296416d20af54d80e6d9a' ;; \ amd64) tarArch='x86_64'; dirArch='x64'; sha256='d20e6984bcf8c3692d853a9922e2cf1de19b91201cb9e396d9264c32cebedc46' ;; \
arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='cdd1420fc3df0058978ccb20e2f4db47cb6d3dd164cb67ba70ee2d5c99306c47' ;; \ # i386
i386) tarArch='i686'; dirArch='x86'; sha256='3e6f2c3d0a168077ddd61383566513303b0153c56352df2dde1531eb16d79143' ;; \ i386) tarArch='i686'; dirArch='x86'; sha256='ab45280c799e63ab04da7a928fee79b43e41b457a6d4c48058798b9bad542688' ;; \
*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \ *) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \
esac; \ esac; \
\ \

View File

@ -27,11 +27,13 @@ for version in '.'; do
for dpkgArch in $(dpkgArches "$version"); do for dpkgArch in $(dpkgArches "$version"); do
tarArch="$(dpkgToJuliaTarArch "$version" "$dpkgArch")" tarArch="$(dpkgToJuliaTarArch "$version" "$dpkgArch")"
dirArch="$(dpkgToJuliaDirArch "$version" "$dpkgArch")" dirArch="$(dpkgToJuliaDirArch "$version" "$dpkgArch")"
sha256="$(echo "$sha256s" | grep "julia-${fullVersion}-linux-${tarArch}.tar.gz$" | cut -d' ' -f1)" sha256="$(echo "$sha256s" | grep "julia-${fullVersion}-linux-${tarArch}.tar.gz$" | cut -d' ' -f1 || :)"
if [ -z "$sha256" ]; then if [ -z "$sha256" ]; then
echo >&2 "error: cannot find sha256 for $fullVersion on arch $tarArch / $dirArch ($dpkgArch)" echo >&2 "warning: cannot find sha256 for $fullVersion on arch $tarArch / $dirArch ($dpkgArch); skipping"
exit 1 continue
fi fi
bashbrewArch="$(dpkgToBashbrewArch "$version" "$dpkgArch")"
linuxArchCase+="# $bashbrewArch"$'\n'
linuxArchCase+=$'\t\t'"$dpkgArch) tarArch='$tarArch'; dirArch='$dirArch'; sha256='$sha256' ;; "$'\\\n' linuxArchCase+=$'\t\t'"$dpkgArch) tarArch='$tarArch'; dirArch='$dirArch'; sha256='$sha256' ;; "$'\\\n'
done done
linuxArchCase+=$'\t\t''*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; '$'\\\n' linuxArchCase+=$'\t\t''*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; '$'\\\n'

View File

@ -3,8 +3,8 @@ FROM microsoft/windowsservercore:1709
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV JULIA_VERSION 0.6.3 ENV JULIA_VERSION 0.6.4
ENV JULIA_SHA256 e6eef263bbe6d95d2def300407edb6a624e77166d73f423cd7fc895f8464cffd ENV JULIA_SHA256 aa16b5fb54ab2821a09022db83d92db5d07c1092a24b7091f54fb4bca9e564eb
RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION -replace '[.-][^.-]+$', '')); \ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION -replace '[.-][^.-]+$', '')); \
Write-Host ('Downloading {0} ...' -f $url); \ Write-Host ('Downloading {0} ...' -f $url); \

View File

@ -3,8 +3,8 @@ FROM microsoft/windowsservercore:ltsc2016
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV JULIA_VERSION 0.6.3 ENV JULIA_VERSION 0.6.4
ENV JULIA_SHA256 e6eef263bbe6d95d2def300407edb6a624e77166d73f423cd7fc895f8464cffd ENV JULIA_SHA256 aa16b5fb54ab2821a09022db83d92db5d07c1092a24b7091f54fb4bca9e564eb
RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION -replace '[.-][^.-]+$', '')); \ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION -replace '[.-][^.-]+$', '')); \
Write-Host ('Downloading {0} ...' -f $url); \ Write-Host ('Downloading {0} ...' -f $url); \