Add 0.7.0-beta2

This commit is contained in:
Tianon Gravi 2018-07-24 12:54:20 -07:00
parent d3bfa97a8d
commit 4b1b740df3
14 changed files with 216 additions and 23 deletions

View File

@ -3,7 +3,9 @@ image: Visual Studio 2017
environment:
matrix:
- version: .
- version: 0-rc
variant: windowsservercore-ltsc2016
- version: 0
variant: windowsservercore-ltsc2016
install:

View File

@ -3,7 +3,9 @@
_awkArch() {
local version="$1"; shift
local awkExpr="$1"; shift
awk "$@" "/^#|^\$/ { next } $awkExpr" "$version/release-architectures"
local file="$version/release-architectures"
[ -f "$file" ] || file='release-architectures'
awk "$@" "/^#|^\$/ { next } $awkExpr" "$file"
}
dpkgArches() {

View File

@ -2,10 +2,12 @@ language: bash
services: docker
env:
- VERSION=. VARIANT=stretch ARCH=
- VERSION=. VARIANT=stretch ARCH=i386
- VERSION=. VARIANT=jessie ARCH=
- VERSION=. VARIANT=jessie ARCH=i386
- VERSION=0-rc VARIANT=stretch ARCH=
- VERSION=0-rc VARIANT=stretch ARCH=i386
- VERSION=0 VARIANT=stretch ARCH=
- VERSION=0 VARIANT=stretch ARCH=i386
- VERSION=0 VARIANT=jessie ARCH=
- VERSION=0 VARIANT=jessie ARCH=i386
install:
- git clone https://github.com/docker-library/official-images.git ~/official-images

71
0-rc/stretch/Dockerfile Normal file
View File

@ -0,0 +1,71 @@
FROM debian:stretch
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
# ERROR: no download agent available; install curl, wget, or fetch
curl \
; \
rm -rf /var/lib/apt/lists/*
ENV JULIA_PATH /usr/local/julia
ENV PATH $JULIA_PATH/bin:$PATH
# https://julialang.org/juliareleases.asc
# Julia (Binary signing key) <buildbot@julialang.org>
ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495
# https://julialang.org/downloads/
ENV JULIA_VERSION 0.7.0-beta2
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
if ! command -v gpg > /dev/null; then \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
dirmngr \
; \
rm -rf /var/lib/apt/lists/*; \
fi; \
\
# https://julialang.org/downloads/#julia-command-line-version
# https://julialang-s3.julialang.org/bin/checksums/julia-0.7.0-beta2.sha256
# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
# amd64
amd64) tarArch='x86_64'; dirArch='x64'; sha256='ea136f417d84ffb4b6bf58fcf534d839dc1c2e9f10696b355fc795dbe99e9d58' ;; \
# arm32v7
armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='366584fa7c04edd018b6e310b6b4fbe9eb375819518f8500078113f54eb5159b' ;; \
# i386
i386) tarArch='i686'; dirArch='x86'; sha256='4017c1fb4d135239274390f51ec2cfce0573534807cf95c63dd54b33337897de' ;; \
*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \
esac; \
\
folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
\
echo "${sha256} *julia.tar.gz" | sha256sum -c -; \
\
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$JULIA_GPG"; \
gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \
command -v gpgconf > /dev/null && gpgconf --kill all; \
rm -rf "$GNUPGHOME" julia.tar.gz.asc; \
\
mkdir "$JULIA_PATH"; \
tar -xzf julia.tar.gz -C "$JULIA_PATH" --strip-components 1; \
rm julia.tar.gz; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
\
# smoke test
julia --version
CMD ["julia"]

View File

@ -0,0 +1,40 @@
FROM microsoft/windowsservercore:1709
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV JULIA_VERSION 0.7.0-beta2
ENV JULIA_SHA256 4f131a343c4bb98fd89caaf7fe9d5969a00cadd59d8177d1ea62340ca58169c7
RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION.Split('.')[0..1] -Join '.')); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JULIA_SHA256); \
if ((Get-FileHash julia.exe -Algorithm sha256).Hash -ne $env:JULIA_SHA256) { \
Write-Host 'FAILED!'; \
exit 1; \
}; \
\
Write-Host 'Installing ...'; \
Start-Process -Wait -NoNewWindow \
-FilePath '.\julia.exe' \
-ArgumentList @( \
'/S', \
'/D=C:\julia' \
); \
\
Write-Host 'Updating PATH ...'; \
$env:PATH = 'C:\julia\bin;' + $env:PATH; \
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \
\
Write-Host 'Verifying install ("julia --version") ...'; \
julia --version; \
\
Write-Host 'Removing ...'; \
Remove-Item julia.exe -Force; \
\
Write-Host 'Complete.'
CMD ["julia"]

View File

@ -0,0 +1,40 @@
FROM microsoft/windowsservercore:ltsc2016
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV JULIA_VERSION 0.7.0-beta2
ENV JULIA_SHA256 4f131a343c4bb98fd89caaf7fe9d5969a00cadd59d8177d1ea62340ca58169c7
RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION.Split('.')[0..1] -Join '.')); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:JULIA_SHA256); \
if ((Get-FileHash julia.exe -Algorithm sha256).Hash -ne $env:JULIA_SHA256) { \
Write-Host 'FAILED!'; \
exit 1; \
}; \
\
Write-Host 'Installing ...'; \
Start-Process -Wait -NoNewWindow \
-FilePath '.\julia.exe' \
-ArgumentList @( \
'/S', \
'/D=C:\julia' \
); \
\
Write-Host 'Updating PATH ...'; \
$env:PATH = 'C:\julia\bin;' + $env:PATH; \
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \
\
Write-Host 'Verifying install ("julia --version") ...'; \
julia --version; \
\
Write-Host 'Removing ...'; \
Remove-Item julia.exe -Force; \
\
Write-Host 'Complete.'
CMD ["julia"]

View File

@ -43,8 +43,9 @@ RUN set -eux; \
*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \
esac; \
\
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
\
echo "${sha256} *julia.tar.gz" | sha256sum -c -; \
\

View File

@ -43,8 +43,9 @@ RUN set -eux; \
*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \
esac; \
\
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
\
echo "${sha256} *julia.tar.gz" | sha256sum -c -; \
\

View File

@ -6,7 +6,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV JULIA_VERSION 0.6.4
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.Split('.')[0..1] -Join '.')); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \

View File

@ -6,7 +6,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV JULIA_VERSION 0.6.4
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.Split('.')[0..1] -Join '.')); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \

View File

@ -36,8 +36,9 @@ RUN set -eux; \
# this "case" statement is generated via "update.sh"
%%ARCH-CASE%%; \
\
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${JULIA_VERSION%[.-]*}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \
curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \
curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \
\
echo "${sha256} *julia.tar.gz" | sha256sum -c -; \
\

View File

@ -6,7 +6,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ENV JULIA_VERSION %%JULIA_VERSION%%
ENV JULIA_SHA256 %%JULIA_WINDOWS_SHA256%%
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.Split('.')[0..1] -Join '.')); \
Write-Host ('Downloading {0} ...' -f $url); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \

View File

@ -1,11 +1,20 @@
#!/usr/bin/env bash
set -Eeuo pipefail
declare -A aliases=(
[0]='latest'
)
defaultDebianVariant='stretch'
self="$(basename "$BASH_SOURCE")"
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
versions=( */ )
versions=( "${versions[@]%/}" )
# sort version numbers with highest first
IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -rV) ); unset IFS
# get the most recent commit which modified any of "$@"
fileCommit() {
git log -1 --format='format:%H' HEAD -- "$@"
@ -77,7 +86,7 @@ join() {
echo "${out#$sep}"
}
for version in .; do
for version in "${versions[@]}"; do
for v in \
{stretch,jessie} \
windows/windowsservercore-{ltsc2016,1709} \
@ -93,11 +102,14 @@ for version in .; do
fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "JULIA_VERSION" { print $3; exit }')"
versionAliases=()
while [ "${fullVersion%.*}" != "$fullVersion" ]; do
while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do
versionAliases+=( $fullVersion )
fullVersion="${fullVersion%.*}"
fullVersion="${fullVersion%[.-]*}"
done
versionAliases+=( $fullVersion latest )
versionAliases+=(
$version
${aliases[$version]:-}
)
variantAliases=( "${versionAliases[@]/%/-$variant}" )
variantAliases=( "${variantAliases[@]//latest-/}" )

View File

@ -3,6 +3,12 @@ set -Eeuo pipefail
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
fi
versions=( "${versions[@]%/}" )
source '.architectures-lib'
# see http://stackoverflow.com/a/2705678/433558
@ -10,11 +16,26 @@ sed_escape_rhs() {
echo "$@" | sed -e 's/[\/&]/\\&/g' | sed -e ':a;N;$!ba;s/\n/\\n/g'
}
rcRegex='-(pre[.])?(alpha|beta|rc)[0-9]*'
pattern='.*/julia-([0-9]+\.[0-9]+\.[0-9]+('"$rcRegex"')?)-linux-x86_64\.tar\.gz.*'
allVersions="$(
curl -fsSL 'https://julialang.org/downloads/' \
| sed -rn "s!${pattern}!\1!gp" \
| sort -ruV
)"
travisEnv=
appveyorEnv=
for version in '.'; do
pattern='.*/julia-([0-9]+\.[0-9]+\.[0-9]+)-linux-x86_64\.tar\.gz.*'
fullVersion="$(curl -fsSL 'https://julialang.org/downloads/' | sed -rn "s!${pattern}!\1!gp" | sort -ruV | head -1)"
for version in "${versions[@]}"; do
rcVersion="${version%-rc}"
rcGrepV='-v'
if [ "$rcVersion" != "$version" ]; then
rcGrepV=
fi
rcGrepV+=' -E'
fullVersion="$(echo "$allVersions" | grep -E "^${rcVersion}([.-]|$)" | grep $rcGrepV -- "$rcRegex" | head -1)"
if [ -z "$fullVersion" ]; then
echo >&2 "error: failed to determine latest release for '$version'"
exit 1
@ -50,7 +71,7 @@ for version in '.'; do
dir="$version/$v"
variant="$(basename "$v")"
mkdir -p "$dir"
[ -d "$dir" ] || continue
case "$variant" in
windowsservercore-*) template='windowsservercore'; tag="${variant#*-}" ;;