diff options
author | Mura Li <typeless@users.noreply.github.com> | 2017-04-05 16:10:32 +0800 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-04-05 16:10:32 +0800 |
commit | 2d1efcc270c854ae8484dae8c3edf5fd14a63c63 (patch) | |
tree | 7841b640ed8b5c23c4f3d7919ebea31562d0f781 /Makefile | |
parent | b746757209bad0a8a1800e8a768ce1a22a22414b (diff) | |
download | gitea-2d1efcc270c854ae8484dae8c3edf5fd14a63c63.tar.gz gitea-2d1efcc270c854ae8484dae8c3edf5fd14a63c63.zip |
Add GOFLAGS and EXTRA_GOFLAGS (#1438)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -11,6 +11,9 @@ BINDATA := modules/{options,public,templates}/bindata.go STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less) JAVASCRIPTS := +GOFLAGS := -i -v +EXTRA_GOFLAGS ?= + LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)" PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell go list ./... | grep -v /vendor/)) @@ -93,7 +96,7 @@ install: $(wildcard *.go) build: $(EXECUTABLE) $(EXECUTABLE): $(SOURCES) - go build -i -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ + go build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ .PHONY: docker docker: |