mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-04 09:19:06 +01:00
Add GOFLAGS and EXTRA_GOFLAGS (#1438)
This commit is contained in:
parent
b746757209
commit
2d1efcc270
1 changed files with 4 additions and 1 deletions
5
Makefile
5
Makefile
|
@ -11,6 +11,9 @@ BINDATA := modules/{options,public,templates}/bindata.go
|
||||||
STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
|
STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
|
||||||
JAVASCRIPTS :=
|
JAVASCRIPTS :=
|
||||||
|
|
||||||
|
GOFLAGS := -i -v
|
||||||
|
EXTRA_GOFLAGS ?=
|
||||||
|
|
||||||
LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)"
|
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/))
|
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell go list ./... | grep -v /vendor/))
|
||||||
|
@ -93,7 +96,7 @@ install: $(wildcard *.go)
|
||||||
build: $(EXECUTABLE)
|
build: $(EXECUTABLE)
|
||||||
|
|
||||||
$(EXECUTABLE): $(SOURCES)
|
$(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
|
.PHONY: docker
|
||||||
docker:
|
docker:
|
||||||
|
|
Loading…
Reference in a new issue