Skip to content

Commit

Permalink
Add make gox
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jun 8, 2019
1 parent 6fc78e6 commit 0adfc47
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ VERSION := $(shell cat VERSION)
REVISION := $(shell git rev-parse --short HEAD)

SRCS := $(shell find . -type f -name '*.go')
LDFLAGS := -ldflags="-s -w -X \"main.Version=$(VERSION)\" -X \"main.Revision=$(REVISION)\" -extldflags \"-static\""
LDFLAGS := "-s -w -X \"main.Version=$(VERSION)\" -X \"main.Revision=$(REVISION)\" -extldflags \"-static\""

.DEFAULT_GOAL := bin/$(NAME)

bin/$(NAME): $(SRCS)
GO111MODULE=on go build $(LDFLAGS) -o bin/$(NAME)
GO111MODULE=on go build -ldflags=$(LDFLAGS) -o bin/$(NAME)

.PHONY: gox
gox:
gox -ldflags=$(LDFLAGS) -output="bin/gitpanda_{{.OS}}_{{.Arch}}"

.PHONY: clean
clean:
Expand Down

0 comments on commit 0adfc47

Please sign in to comment.