summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMura Li <typeless@users.noreply.github.com>2017-04-05 16:10:32 +0800
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-04-05 16:10:32 +0800
commit2d1efcc270c854ae8484dae8c3edf5fd14a63c63 (patch)
tree7841b640ed8b5c23c4f3d7919ebea31562d0f781 /Makefile
parentb746757209bad0a8a1800e8a768ce1a22a22414b (diff)
downloadgitea-2d1efcc270c854ae8484dae8c3edf5fd14a63c63.tar.gz
gitea-2d1efcc270c854ae8484dae8c3edf5fd14a63c63.zip
Add GOFLAGS and EXTRA_GOFLAGS (#1438)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 63dab1680a..3614364df6 100644
--- a/Makefile
+++ b/Makefile
@@ -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: