Skip to content

Commit

Permalink
Build staticly with musl for better compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dsix-work committed Nov 8, 2019
1 parent 358fd07 commit 49924c4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ builds:
main: ./cmd/cfssl
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: cfssl-windows
binary: cfssl
env:
Expand Down Expand Up @@ -58,6 +61,9 @@ builds:
main: ./cmd/cfssl-bundle
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: cfssl-bundle-windows
binary: cfssl-bundle
env:
Expand Down Expand Up @@ -91,6 +97,9 @@ builds:
main: ./cmd/cfssl-certinfo
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: cfssl-certinfo-windows
binary: cfssl-certinfo
env:
Expand Down Expand Up @@ -124,6 +133,9 @@ builds:
main: ./cmd/cfssl-newkey
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: cfssl-newkey-windows
binary: cfssl-newkey
env:
Expand Down Expand Up @@ -157,6 +169,9 @@ builds:
main: ./cmd/cfssl-scan
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: cfssl-scan-windows
binary: cfssl-scan
env:
Expand Down Expand Up @@ -190,6 +205,9 @@ builds:
main: ./cmd/cfssljson
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: cfssljson-windows
binary: cfssljson
env:
Expand Down Expand Up @@ -223,6 +241,9 @@ builds:
main: ./cmd/mkbundle
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: mkbundle-windows
binary: mkbundle
env:
Expand Down Expand Up @@ -256,6 +277,9 @@ builds:
main: ./cmd/multirootca
ldflags:
- -s -w -X github.com/cloudflare/cfssl/cli/version.version={{.Version}}
- -linkmode external -extldflags "-static"
env:
- CC=/usr/bin/musl-gcc
- id: multirootca-windows
binary: multirootca
env:
Expand Down

0 comments on commit 49924c4

Please sign in to comment.