Skip to content

Commit

Permalink
Merge pull request #251 from wttech/250-unknown-time-zone-etcutc
Browse files Browse the repository at this point in the history
#250 Add `-tags timetzdata` to the `go build` for Windows
  • Loading branch information
krystian-panek-vmltech authored Aug 6, 2024
2 parents dd939b5 + 7aa7285 commit c7701bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ builds:
- linux
- windows
- darwin
tags:
- timetzdata
ldflags:
- "-s -w -X main.appVersion={{ .Version }} -X main.appCommit={{ .Commit }} -X main.appCommitDate={{.CommitDate}}"

Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.GIT_COMMIT_DATE=$(shell git log -1 --date=format:'%Y-%m-%dT%H:%M:%S' --format=%cd)
.GIT_VERSION=$(shell git describe --tags 2>/dev/null || echo "$(.GIT_COMMIT)")
.LD_FLAGS=$(shell echo "-s -w -X main.appVersion=${.GIT_VERSION} -X main.appCommit=${.GIT_COMMIT} -X main.appCommitDate=${.GIT_COMMIT_DATE}")
.TAGS=timetzdata

all: deps test vet fmt lint install

Expand All @@ -25,15 +26,15 @@ lint:
revive -config revive.toml -formatter friendly ./...

build:
go build --ldflags "${.LD_FLAGS}" -o bin/aem ./cmd/aem
go build -tags "${.TAGS}" --ldflags "${.LD_FLAGS}" -o bin/aem ./cmd/aem

install:
go install --ldflags "${.LD_FLAGS}" ./cmd/aem
go install -tags "${.TAGS}" --ldflags "${.LD_FLAGS}" ./cmd/aem

other_build:
GOARCH=amd64 GOOS=darwin go build --ldflags "${.LD_FLAGS}" -o bin/aem.darwin ./cmd/aem
GOARCH=amd64 GOOS=linux go build --ldflags "${.LD_FLAGS}" -o bin/aem.linux ./cmd/aem
GOARCH=amd64 GOOS=windows go build --ldflags "${.LD_FLAGS}" -o bin/aem.exe ./cmd/aem
GOARCH=amd64 GOOS=darwin go build -tags "${.TAGS}" --ldflags "${.LD_FLAGS}" -o bin/aem.darwin ./cmd/aem
GOARCH=amd64 GOOS=linux go build -tags "${.TAGS}" --ldflags "${.LD_FLAGS}" -o bin/aem.linux ./cmd/aem
GOARCH=amd64 GOOS=windows go build -tags "${.TAGS}" --ldflags "${.LD_FLAGS}" -o bin/aem.exe ./cmd/aem

clean:
go clean
Expand Down

0 comments on commit c7701bb

Please sign in to comment.