releaser: Fix statically linked binaries
authorJames Munnelly <munnerz@users.noreply.github.com>
Mon, 24 Apr 2017 14:22:23 +0000 (15:22 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 24 Apr 2017 18:29:38 +0000 (20:29 +0200)
In Hugo 0.20.3, the released binaries for Linux was no longer statically linked. This commit fixes that.

Fixes #3382

goreleaser.yml

index 4b7fef63a1babb7dcbf3e2a1e8c2e5455424db01..582ad7d135cafdc5b3552fc0b561b41c41ee3529 100644 (file)
@@ -1,7 +1,7 @@
 build:
   main: main.go
   binary: hugo
-  ldflags_template: -s -w -X hugolib.BuildDate={{.Date}}
+  ldflags_template: -s -w -X hugolib.BuildDate={{.Date}} -linkmode external -extldflags "-static"
   goos:
     - darwin
     - linux