Skip to content

Commit

Permalink
#250 Add tag timetzdata to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-andruszkiewicz-wttech committed May 25, 2024
1 parent b804930 commit 7aa7285
Showing 1 changed file with 6 additions and 5 deletions.
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 -tags timetzdata --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 7aa7285

Please sign in to comment.