From 835d0dc859c305b4d9338c61ecaa69073c238405 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 3 Apr 2020 18:05:12 +0200 Subject: [PATCH] Fix release version not added to binaries (#107) --- .goreleaser.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 50f59306..c0028f70 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,20 +1,15 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com release: - # Repo in which the release will be created. github: owner: volkszaehler name: mbmd before: hooks: - # you may remove this if you don't need go generate - - go generate ./... + - make assets builds: -- id: mbmd - # Path to main.go file or main package. +- id: main main: main.go ldflags: - - -X github.com/volkszaehler/mbmd.Version={{.Version}} -X github.com/volkszaehler/mbmd.Commit={{.ShortCommit}} + - -X github.com/volkszaehler/mbmd/server.Version={{.Version}} -X github.com/volkszaehler/mbmd/server.Commit={{.ShortCommit}} env: - CGO_ENABLED=0 goos: @@ -25,6 +20,17 @@ builds: - arm goarm: - "6" +archives: + - builds: + - main + replacements: + amd64: 64-bit + 386: 32-bit + darwin: macOS + format: tar.gz + format_overrides: + - goos: windows + format: zip checksum: name_template: 'checksums.txt' snapshot: