releaser: Update to Go go1.17.2
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 10 Oct 2021 14:51:06 +0000 (16:51 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 10 Oct 2021 14:53:44 +0000 (16:53 +0200)
* This now uses the `golang:1.17.2-buster` Docker image which runs GLIBC 2.28-10.
* Also added a build hook to warn us if this happens again in the future.

Fixes #8955

.circleci/config.yml
goreleaser-hook-post-linux.sh [new file with mode: 0755]
goreleaser.yml

index 900d973f2bfce25e277cf1503bf8514191fc9f0b..cb153b8a8f17e0a999e802cff56d013ce682cd70 100644 (file)
@@ -1,6 +1,6 @@
 defaults: &defaults
   docker:
-      - image: bepsays/ci-goreleaser:1.16.7
+      - image: bepsays/ci-goreleaser:1.17.2
   environment:
     CGO_ENABLED: "0"
 
diff --git a/goreleaser-hook-post-linux.sh b/goreleaser-hook-post-linux.sh
new file mode 100755 (executable)
index 0000000..e97e274
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Se https://github.com/gohugoio/hugo/issues/8955
+objdump -T dist/hugo_extended_linux_linux_amd64/hugo | grep -E -q 'GLIBC_2.2[0-9]'
+RESULT=$?
+if [ $RESULT -eq 0 ]; then
+    echo "Found  GLIBC_2.2x in Linux binary, this will not work in older Vercel/Netlify images.";
+    exit -1;
+fi
index 44539ff46569025462b7c14c3558e5daa86de3c9..d6aba296b11ab600a0f2f5a901b53e982fbeb07b 100644 (file)
@@ -84,6 +84,8 @@ builds:
       - linux
     goarch:
       - amd64
+    hooks:
+      post: ./goreleaser-hook-post-linux.sh
 release:
   draft: true