-
Notifications
You must be signed in to change notification settings - Fork 517
Fix some minor bugs in update.sh and add windowsservercore variants for 1.5 and 1.7 #108
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 5064128550ac4d68f8f46a69bac6c84e329efb2e
Author: Tianon Gravi <admwiggin@gmail.com>
Date: Fri Aug 12 12:12:03 2016 -0700
Fix some minor bugs in update.sh and add windowsservercore variants for 1.5 and 1.7
diff --git a/1.6/windows/windowsservercore/Dockerfile b/1.5/windows/windowsservercore/Dockerfile
similarity index 91%
copy from 1.6/windows/windowsservercore/Dockerfile
copy to 1.5/windows/windowsservercore/Dockerfile
index 8d33a33..229c696 100644
--- a/1.6/windows/windowsservercore/Dockerfile
+++ b/1.5/windows/windowsservercore/Dockerfile
@@ -13,6 +13,7 @@ RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \
if ((Get-FileHash git.exe -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \
+ Write-Host 'FAILED!'; \
exit 1; \
}; \
\
@@ -51,21 +52,25 @@ ENV GOPATH C:\\gopath
RUN [Environment]::SetEnvironmentVariable('PATH', $env:GOPATH + '\bin;C:\go\bin;' + $env:PATH, [EnvironmentVariableTarget]::Machine);
# doing this first to share cache across versions more aggressively
-ENV GOLANG_VERSION 1.6.3
+ENV GOLANG_VERSION 1.5.4
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip
-ENV GOLANG_DOWNLOAD_SHA256 6a18e5ed8b39785338986aecc6a3f36f5c4be286ff52db0ae3bcd2275ab70df0
+ENV GOLANG_DOWNLOAD_SHA256 1201053d5659a5fc5c82dff58c3eaee66ecd02901621725cfdfff1681278bd1a
RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
(New-Object System.Net.WebClient).DownloadFile($env:GOLANG_DOWNLOAD_URL, 'go.zip'); \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+ Write-Host 'FAILED!'; \
exit 1; \
}; \
\
Write-Host 'Expanding ...'; \
Expand-Archive go.zip -DestinationPath C:\; \
\
+ Write-Host 'Verifying install ("go version") ...'; \
+ go version; \
+ \
Write-Host 'Removing ...'; \
Remove-Item go.zip -Force; \
\
diff --git a/1.6/windows/windowsservercore/Dockerfile b/1.6/windows/windowsservercore/Dockerfile
index 8d33a33..1b241fa 100644
--- a/1.6/windows/windowsservercore/Dockerfile
+++ b/1.6/windows/windowsservercore/Dockerfile
@@ -13,6 +13,7 @@ RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \
if ((Get-FileHash git.exe -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \
+ Write-Host 'FAILED!'; \
exit 1; \
}; \
\
@@ -60,12 +61,16 @@ RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+ Write-Host 'FAILED!'; \
exit 1; \
}; \
\
Write-Host 'Expanding ...'; \
Expand-Archive go.zip -DestinationPath C:\; \
\
+ Write-Host 'Verifying install ("go version") ...'; \
+ go version; \
+ \
Write-Host 'Removing ...'; \
Remove-Item go.zip -Force; \
\
diff --git a/1.6/windows/windowsservercore/Dockerfile b/1.7/windows/windowsservercore/Dockerfile
similarity index 91%
copy from 1.6/windows/windowsservercore/Dockerfile
copy to 1.7/windows/windowsservercore/Dockerfile
index 8d33a33..f0f19ce 100644
--- a/1.6/windows/windowsservercore/Dockerfile
+++ b/1.7/windows/windowsservercore/Dockerfile
@@ -13,6 +13,7 @@ RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \
if ((Get-FileHash git.exe -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \
+ Write-Host 'FAILED!'; \
exit 1; \
}; \
\
@@ -51,21 +52,25 @@ ENV GOPATH C:\\gopath
RUN [Environment]::SetEnvironmentVariable('PATH', $env:GOPATH + '\bin;C:\go\bin;' + $env:PATH, [EnvironmentVariableTarget]::Machine);
# doing this first to share cache across versions more aggressively
-ENV GOLANG_VERSION 1.6.3
+ENV GOLANG_VERSION 1.7rc6
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip
-ENV GOLANG_DOWNLOAD_SHA256 6a18e5ed8b39785338986aecc6a3f36f5c4be286ff52db0ae3bcd2275ab70df0
+ENV GOLANG_DOWNLOAD_SHA256 f043f7327049340e078ded4f9eed0b811f8cfa1adb7492403d3dea9cfebee13b
RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
(New-Object System.Net.WebClient).DownloadFile($env:GOLANG_DOWNLOAD_URL, 'go.zip'); \
\
Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+ Write-Host 'FAILED!'; \
exit 1; \
}; \
\
Write-Host 'Expanding ...'; \
Expand-Archive go.zip -DestinationPath C:\; \
\
+ Write-Host 'Verifying install ("go version") ...'; \
+ go version; \
+ \
Write-Host 'Removing ...'; \
Remove-Item go.zip -Force; \
\
diff --git a/update.sh b/update.sh
index fe61311..58f3c53 100755
--- a/update.sh
+++ b/update.sh
@@ -40,12 +40,13 @@ for version in "${versions[@]}"; do
[[ "$versionTag" == *.*[^0-9]* ]] || versionTag+='.0'
(
set -x
- sed -ri '
- s/^(ENV GOLANG_VERSION) .*/\1 '"$fullVersion"'/;
- s/^(ENV GOLANG_DOWNLOAD_SHA256) .*/\1 '"$linuxSha256"'/;
- s/^(ENV GOLANG_SRC_SHA256) .*/\1 '"$srcSha256"'/;
- s/^(FROM golang):.*/\1:'"$version"'/;
- ' "$version/Dockerfile" "$version/"*"/Dockerfile"
+ sed -ri \
+ -e 's/^(ENV GOLANG_VERSION) .*/\1 '"$fullVersion"'/' \
+ -e 's/^(ENV GOLANG_DOWNLOAD_SHA256) .*/\1 '"$linuxSha256"'/' \
+ -e 's/^(ENV GOLANG_SRC_SHA256) .*/\1 '"$srcSha256"'/' \
+ -e 's/^(FROM golang):.*/\1:'"$version"'/' \
+ "$version/Dockerfile" \
+ "$version/"*"/Dockerfile"
cp go-wrapper "$version/"
)
for variant in alpine wheezy; do
@@ -64,7 +65,10 @@ for version in "${versions[@]}"; do
if [ -d "$version/$variant" ]; then
(
set -x
- sed -ri 's/^(ENV GOLANG_DOWNLOAD_SHA256) .*/\1 '"$windowsSha256"'/' "$version/$variant/Dockerfile"
+ sed -ri \
+ -e 's/^(ENV GOLANG_VERSION) .*/\1 '"$fullVersion"'/' \
+ -e 's/^(ENV GOLANG_DOWNLOAD_SHA256) .*/\1 '"$windowsSha256"'/' \
+ "$version/$variant/Dockerfile"
)
fi
done |
feceb0d
to
224f2fc
Compare
@@ -8,37 +8,41 @@ ENV GIT_TAG v${GIT_VERSION}.windows.1 | |||
ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/Git-${GIT_VERSION}-64-bit.exe | |||
ENV GIT_DOWNLOAD_SHA256 006d971bcbe73cc8d841a100a4eb20d22e135142bf5b0f2120722fd420e166e5 | |||
# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) | |||
# see https://disqus.com/home/discussion/chocolatey/chocolatey_gallery_git_install_1710/#comment-2834659433 for why we don't use "/LOADINF=..." to let the installer set PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL GIT
5d6976e
to
d8bf13c
Compare
LGTM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expanding on #106 👍