releaser: Only build amd64 binary for freebsd, netbsd, openbsd, dragonfly
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 30 Oct 2021 09:25:04 +0000 (11:25 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 31 Oct 2021 09:04:01 +0000 (10:04 +0100)
Fixes #9102

goreleaser.yml

index d6aba296b11ab600a0f2f5a901b53e982fbeb07b..af887e512cf9a2c4e78286afcc7264dc043720db 100644 (file)
@@ -19,10 +19,6 @@ builds:
       - darwin
       - linux
       - windows
-      - freebsd
-      - netbsd
-      - openbsd
-      - dragonfly
     goarch:
       - amd64
       - 386
@@ -33,7 +29,22 @@ builds:
     ignore:
       - goos: darwin
         goarch: 386
-
+  -
+      binary: hugo
+      id: hugo_unix
+      ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }} -X github.com/gohugoio/hugo/common/hugo.vendorInfo=gohugoio
+      env:
+        - CGO_ENABLED=0
+      flags:
+        - -buildmode
+        - exe
+      goos:
+        - freebsd
+        - netbsd
+        - openbsd
+        - dragonfly
+      goarch:
+        - amd64
   -
     binary: hugo
     id: hugo_extended_windows
@@ -92,7 +103,7 @@ release:
 archives:
   -
     id: "hugo"
-    builds: ['hugo']
+    builds: ['hugo', 'hugo_unix']
     format: tar.gz
     format_overrides:
       - goos: windows