forked from gitea/gitea
1
0
Fork 0

Merge pull request #2832 from dankm/build-flags

Make go's build flags a variable
This commit is contained in:
Unknwon 2016-03-15 14:42:15 -04:00
commit 414e5f09c7
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
GENERATED := modules/bindata/bindata.go public/css/gogs.css GENERATED := modules/bindata/bindata.go public/css/gogs.css
TAGS = "" TAGS = ""
BUILD_FLAGS = "-v"
RELEASE_ROOT = "release" RELEASE_ROOT = "release"
RELEASE_GOGS = "release/gogs" RELEASE_GOGS = "release/gogs"
@ -16,14 +17,14 @@ NOW = $(shell date -u '+%Y%m%d%I%M%S')
.IGNORE: public/css/gogs.css .IGNORE: public/css/gogs.css
build: $(GENERATED) build: $(GENERATED)
go install -v -ldflags '$(LDFLAGS)' -tags '$(TAGS)' go install $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
cp '$(GOPATH)/bin/gogs' . cp '$(GOPATH)/bin/gogs' .
govet: govet:
go tool vet -composites=false -methods=false -structtags=false . go tool vet -composites=false -methods=false -structtags=false .
build-dev: $(GENERATED) govet build-dev: $(GENERATED) govet
go install -v -race -tags '$(TAGS)' go install $(BUILD_FLAGS) -race -tags '$(TAGS)'
cp '$(GOPATH)/bin/gogs' . cp '$(GOPATH)/bin/gogs' .
pack: pack: