File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,17 @@ MAJOR_MINOR_VERSION=$(echo "$GO_RELEASE_VERSION" | sed -E -e "s#([0-9]+\.[0-9]+)
23
23
GOLANG_DOWNLOAD_SHA256_ARM=$( curl -s -L https://golang.org/dl/\? mode\= json | jq -r " .[] | select( .version | contains(\" go${GO_RELEASE_VERSION} \" )) | .files[] | select (.filename | contains(\" go${GO_RELEASE_VERSION} .linux-arm64.tar.gz\" )) | .sha256" )
24
24
GOLANG_DOWNLOAD_SHA256_AMD=$( curl -s -L https://golang.org/dl/\? mode\= json | jq -r " .[] | select( .version | contains(\" go${GO_RELEASE_VERSION} \" )) | .files[] | select (.filename | contains(\" go${GO_RELEASE_VERSION} .linux-amd64.tar.gz\" )) | .sha256" )
25
25
26
+ # # As long as https://golang.org/dl/?mode=json supports only 2 major versions
27
+ # # and there is a new major release, then it's required to parse https://golang.org/dl
28
+ # # see https://github.com/elastic/golang-crossbuild/pull/389/commits/d0af04f97a2381630ea5e8da5a99f50cf27856a0
29
+ if [ -z " $GOLANG_DOWNLOAD_SHA256_ARM " ] ; then
30
+ GOLANG_DOWNLOAD_SHA256_ARM=$( curl -s -L https://golang.org/dl | grep go${GO_RELEASE_VERSION} .linux-arm64.tar.gz -A 5 | grep " <tt>" | sed ' s#.*<tt>##g' | sed ' s#</t.*##g' )
31
+ fi
32
+
33
+ if [ -z " $GOLANG_DOWNLOAD_SHA256_AMD " ] ; then
34
+ GOLANG_DOWNLOAD_SHA256_ARM=$( curl -s -L https://golang.org/dl | grep go${GO_RELEASE_VERSION} .linux-amd64.tar.gz -A 5 | grep " <tt>" | sed ' s#.*<tt>##g' | sed ' s#</t.*##g' )
35
+ fi
36
+
26
37
echo " Update go version ${GO_RELEASE_VERSION} "
27
38
28
39
find " go" -type f -name Dockerfile.tmpl -print0 |
You can’t perform that action at this time.
0 commit comments