Skip to content

Commit 89b7ba8

Browse files
committed
more things to try for goreleaser
1 parent 40961b5 commit 89b7ba8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.goreleaser.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
before:
22
hooks:
3-
- go mod download
4-
- go get ./...
3+
- make goreleaser_hook
54
builds:
65
-
76
main: ./cmd/prom-isi-exporter.go

Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ RELEASE?=$(shell git describe --abbrev=4 --dirty --always --tags)
55
COMMIT?=$(shell git rev-parse --short HEAD)
66

77
all: clean build
8+
goreleaser_hook: clean goreleaser_pre
89

910
build:
1011
GO111MODULE=on go build -o bin/${TARGET_BINARY} \
@@ -16,6 +17,12 @@ build:
1617
goreleaser:
1718
goreleaser --snapshot --skip-publish --rm-dist
1819

20+
goreleaser_pre:
21+
GOOS=linux GOARCH=amd64 go mod download
22+
GOOS=windows GOARCH=amd64 go mod download
23+
GOOS=linux GOARCH=amd64 go get ./...
24+
GOOS=windows GOARCH=amd64 go get ./...
25+
1926
clean:
2027
for file in bin/$(TARGET_BINARY); do \
2128
if [ -e "$$file" ]; then \

0 commit comments

Comments
 (0)