releaser: Update Go Releaser and consolidate the 2 configs

Fixes #5949
This commit is contained in:
Bjørn Erik Pedersen 2019-06-08 14:14:27 +02:00
parent e8a716b23a
commit 31c9c690fd
3 changed files with 172 additions and 149 deletions

View File

@ -1,6 +1,6 @@
defaults: &defaults defaults: &defaults
docker: docker:
- image: bepsays/ci-goreleaser:1.12-3 - image: bepsays/ci-goreleaser:1.12-5
environment: environment:
CGO_ENABLED: "0" CGO_ENABLED: "0"

View File

@ -1,85 +0,0 @@
project_name: hugo_extended
builds:
- binary: hugo
ldflags:
- -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
- "-extldflags '-static'"
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
flags:
- -tags
- extended
goos:
- windows
goarch:
- amd64
- binary: hugo
ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
flags:
- -tags
- extended
goos:
- darwin
goarch:
- amd64
- binary: hugo
ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
env:
- CGO_ENABLED=1
flags:
- -tags
- extended
goos:
- linux
goarch:
- amd64
nfpm:
formats:
- deb
vendor: "gohugo.io"
homepage: "https://gohugo.io/"
maintainer: "Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>"
description: "A Fast and Flexible Static Site Generator built with love in GoLang."
license: "Apache 2.0"
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
archive:
format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
release:
draft: true

View File

@ -1,66 +1,174 @@
project_name: hugo project_name: hugo
build: env:
main: main.go - GO111MODULE=on
binary: hugo - GOPROXY=https://proxy.golang.org
ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }} before:
env: hooks:
- CGO_ENABLED=0 - go mod download
goos: builds:
- darwin -
- linux binary: hugo
- windows id: hugo
- freebsd ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
- netbsd env:
- openbsd - CGO_ENABLED=0
- dragonfly goos:
goarch: - darwin
- amd64 - linux
- 386 - windows
- arm - freebsd
- arm64 - netbsd
goarm: - openbsd
- 7 - dragonfly
nfpm: goarch:
formats: - amd64
- deb - 386
vendor: "gohugo.io" - arm
homepage: "https://gohugo.io/" - arm64
maintainer: "Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>" goarm:
description: "A Fast and Flexible Static Site Generator built with love in GoLang." - 7
license: "Apache 2.0"
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}" -
replacements: binary: hugo
amd64: 64bit id: hugo_extended_windows
386: 32bit ldflags:
arm: ARM - -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
arm64: ARM64 - "-extldflags '-static'"
darwin: macOS env:
linux: Linux - CGO_ENABLED=1
windows: Windows - CC=x86_64-w64-mingw32-gcc
openbsd: OpenBSD - CXX=x86_64-w64-mingw32-g++
netbsd: NetBSD flags:
freebsd: FreeBSD - -tags
dragonfly: DragonFlyBSD - extended
archive: goos:
format: tar.gz - windows
format_overrides: goarch:
- goos: windows - amd64
format: zip - binary: hugo
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}" id: hugo_extended_darwin
replacements: ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
amd64: 64bit env:
386: 32bit - CGO_ENABLED=1
arm: ARM - CC=o64-clang
arm64: ARM64 - CXX=o64-clang++
darwin: macOS flags:
linux: Linux - -tags
windows: Windows - extended
openbsd: OpenBSD goos:
netbsd: NetBSD - darwin
freebsd: FreeBSD goarch:
dragonfly: DragonFlyBSD - amd64
files: - binary: hugo
- README.md id: hugo_extended_linux
- LICENSE ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }}
env:
- CGO_ENABLED=1
flags:
- -tags
- extended
goos:
- linux
goarch:
- amd64
release: release:
draft: true draft: true
archives:
-
id: "hugo"
builds: ['hugo']
format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
-
id: "hugo_extended"
builds: ['hugo_extended_windows', 'hugo_extended_linux', 'hugo_extended_darwin']
format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}_extended_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
nfpms:
-
id: "hugo"
builds: ['hugo']
formats:
- deb
vendor: "gohugo.io"
homepage: "https://gohugo.io/"
maintainer: "Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>"
description: "A Fast and Flexible Static Site Generator built with love in GoLang."
license: "Apache 2.0"
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
-
id: "hugo_extended"
builds: ['hugo_extended_linux']
formats:
- deb
vendor: "gohugo.io"
homepage: "https://gohugo.io/"
maintainer: "Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>"
description: "A Fast and Flexible Static Site Generator built with love in GoLang."
license: "Apache 2.0"
name_template: "{{.ProjectName}}_extended_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD