Skip to content

Commit 7be4089

Browse files
author
jguerreiro
committed
ci(release): tweak goreleaser
1 parent d210344 commit 7be4089

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
/testdata
2626
src-fingerprint
2727
.cache_ggshield
28+
dist/

.goreleaser.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This is an example .goreleaser.yml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
- go mod tidy
6+
builds:
7+
- env:
8+
- CGO_ENABLED=0
9+
goos:
10+
- linux
11+
- windows
12+
- darwin
13+
main: ./cmd/src-fingerprint
14+
# Default build flags is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
15+
16+
archives:
17+
- replacements:
18+
darwin: Darwin
19+
linux: Linux
20+
windows: Windows
21+
386: i386
22+
amd64: x86_64
23+
checksum:
24+
name_template: "checksums.txt"
25+
snapshot:
26+
name_template: "{{ .Tag }}-next"
27+
changelog:
28+
sort: asc
29+
filters:
30+
exclude:
31+
- "^docs:"
32+
- "^test:"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BIN := src-fingerprint
66
GO ?= go
77
GOFLAGS := -v
88
EXTRA_GOFLAGS ?=
9-
LDFLAGS := $(LDFLAGS)
9+
LDFLAGS := $(LDFLAGS) -X main.version=dev -X main.builtBy=makefile`
1010
SOURCES ?= $(shell find ./* -name "*.go" -type f ! -path "./vendor/*")
1111
1212
.PHONY: default

0 commit comments

Comments
 (0)