diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-08-22 22:36:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-22 22:36:58 +0800 |
commit | 13ae25b785bc2545c30a13f6e28f4a44d3287b98 (patch) | |
tree | 52b8f86061d59e683772038663f1390c8ea7d4cf | |
parent | 40513a117f83077bfaffb9bf969b2000d85ba7cc (diff) |
Makefile: explicitly call go generate (#6269)
-rw-r--r-- | Makefile | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -5,8 +5,6 @@ CONF_FILES := $(shell find conf | sed 's/ /\\ /g') TEMPLATES_FILES := $(shell find templates | sed 's/ /\\ /g') PUBLIC_FILES := $(shell find public | sed 's/ /\\ /g') LESS_FILES := $(wildcard public/less/*.less) -ASSETS_GENERATED := internal/assets/conf/conf_gen.go internal/assets/templates/templates_gen.go internal/assets/public/public_gen.go -GENERATED := $(ASSETS_GENERATED) public/css/gogs.min.css TAGS = "" BUILD_FLAGS = "-v" @@ -28,10 +26,7 @@ dist: release web: build ./gogs web -build: $(GENERATED) - go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)' -trimpath -o gogs - -build-no-gen: +build: go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)' -trimpath -o gogs pack: @@ -42,22 +37,10 @@ pack: release: build pack -generate: clean $(ASSETS_GENERATED) - -internal/assets/conf/conf_gen.go: $(CONF_FILES) - -rm -f $@ +generate: clean go generate internal/assets/conf/conf.go - gofmt -s -w $@ - -internal/assets/templates/templates_gen.go: $(TEMPLATES_FILES) - -rm -f $@ go generate internal/assets/templates/templates.go - gofmt -s -w $@ - -internal/assets/public/public_gen.go: $(PUBLIC_FILES) - -rm -f $@ go generate internal/assets/public/public.go - gofmt -s -w $@ less: clean public/css/gogs.min.css |