Setup release binaries and goreleaser
This commit is contained in:
parent
c01872419a
commit
bb8ac01706
|
@ -12,3 +12,5 @@
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
|
# destination directory of built binaries for release
|
||||||
|
dist/
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
project_name: gelim
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
# - windows
|
||||||
|
- darwin
|
||||||
|
- freebsd
|
||||||
|
- netbsd
|
||||||
|
- openbsd
|
||||||
|
goarch:
|
||||||
|
- 386
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
- arm
|
||||||
|
goarm:
|
||||||
|
- 6
|
||||||
|
- 7
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: 386
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: arm
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: arm64
|
||||||
|
- goos: netbsd
|
||||||
|
goarch: arm
|
||||||
|
- goos: netbsd
|
||||||
|
goarch: arm64
|
||||||
|
- goos: openbsd
|
||||||
|
goarch: arm
|
||||||
|
- goos: openbsd
|
||||||
|
goarch: arm64
|
||||||
|
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.Version={{.Version}}
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- format: tar.gz
|
||||||
|
# this name template makes the OS and Arch compatible with the results of uname.
|
||||||
|
name_template: >-
|
||||||
|
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
|
||||||
|
{{- if eq .Arch "amd64" }}x86_64
|
||||||
|
{{- else if eq .Arch "386" }}i386
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
|
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||||
|
# use zip for windows archives
|
||||||
|
# format_overrides:
|
||||||
|
# - goos: windows
|
||||||
|
# format: zip
|
||||||
|
changelog:
|
||||||
|
skip: true
|
||||||
|
release:
|
||||||
|
skip_upload: true
|
||||||
|
|
||||||
|
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
||||||
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
4
Makefile
4
Makefile
|
@ -75,3 +75,7 @@ uninstall:
|
||||||
${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR)
|
${RMDIR_IF_EMPTY} $(DESTDIR)$(BINDIR)
|
||||||
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man1
|
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)/man1
|
||||||
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)
|
$(RMDIR_IF_EMPTY) $(DESTDIR)$(MANDIR)
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
|
release:
|
||||||
|
goreleaser release --skip-publish --skip-validate --rm-dist
|
||||||
|
|
Loading…
Reference in New Issue