Skip to content

Commit

Permalink
makefile: correctly inject vcs information into the binary (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
igungor committed Aug 23, 2023
1 parent 550a846 commit be63977
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Expand Up @@ -4,7 +4,7 @@ before:
builds:
-
binary: s5cmd
ldflags: -s -w -X github.com/peak/s5cmd/version.Version={{.Tag}} -X github.com/peak/s5cmd/version.GitCommit={{ .ShortCommit }}
ldflags: -s -w -X github.com/peak/s5cmd/v2/version.Version={{.Tag}} -X github.com/peak/s5cmd/v2/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -5,7 +5,7 @@ all: clean build test check

VERSION := `git describe --abbrev=0 --tags || echo "0.0.0"`
BUILD := `git rev-parse --short HEAD`
LDFLAGS=-ldflags "-X=github.com/peak/s5cmd/version.Version=$(VERSION) -X=github.com/peak/s5cmd/version.GitCommit=$(BUILD)"
LDFLAGS=-ldflags "-X=github.com/peak/s5cmd/v2/version.Version=$(VERSION) -X=github.com/peak/s5cmd/v2/version.GitCommit=$(BUILD)"

.PHONY: build
build:
Expand Down

0 comments on commit be63977

Please sign in to comment.