From 6b602e543f90bda2bded4db96de288a93e56693e Mon Sep 17 00:00:00 2001 From: k1LoW Date: Sat, 16 Mar 2019 21:15:25 +0900 Subject: [PATCH] Fix goreleaser.yml for CGO_ENABLED=1 --- .goreleaser.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 40137e1..835f370 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,13 +3,24 @@ before: - go mod download - go mod tidy builds: -- goos: - - linux - - darwin +- binary: hrv + main: ./cmd/hrv/main.go ldflags: - -s -w -X github.com/k1LoW/harvest.version={{.Version}} -X github.com/k1LoW/harvest.commit={{.FullCommit}} -X github.com/k1LoW/harvest.date={{.Date}} -X github.com/k1LoW/harvest/version.Version={{.Version}} + env: + - CGO_ENABLED=1 + - CC=o64-clang + - CXX=o64-clang++ + goos: + - darwin +- binary: hrv main: ./cmd/hrv/main.go - binary: hrv + ldflags: + - -s -w -X github.com/k1LoW/harvest.version={{.Version}} -X github.com/k1LoW/harvest.commit={{.FullCommit}} -X github.com/k1LoW/harvest.date={{.Date}} -X github.com/k1LoW/harvest/version.Version={{.Version}} + env: + - CGO_ENABLED=1 + goos: + - linux archive: name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' format_overrides: