Skip to content

Commit fe0218e

Browse files
committed
OK we cannot have the swagger be in the frontend generation so move it to backend
Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent 055e3d2 commit fe0218e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack pub
111111
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
112112
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
113113

114+
GENERATED_GO_DEST := modules/charset/invisible_gen.go modules/charset/ambiguous_gen.go
115+
114116
SVG_DEST_DIR := public/img/svg
115117

116118
AIR_TMP_DIR := .air
@@ -130,9 +132,11 @@ GO_DIRS := cmd tests models modules routers build services tools
130132

131133
GO_SOURCES := $(wildcard *.go)
132134
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
135+
GO_SOURCES += $(GENERATED_GO_DEST)
133136

134137
ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
135138
GO_SOURCES += $(BINDATA_DEST)
139+
GENERATED_GO_DEST += $(BINDATA_DEST)
136140
endif
137141

138142
# Force installation of playwright dependencies by setting this flag
@@ -713,13 +717,14 @@ backend: go-check generate-backend $(EXECUTABLE)
713717
generate: generate-backend generate-frontend
714718

715719
.PHONY: generate-backend
716-
generate-backend: $(TAGS_PREREQ)
720+
generate-backend: $(TAGS_PREREQ) generate-go generate-swagger
721+
722+
generate-go: $(TAGS_PREREQ)
717723
@echo "Running go generate..."
718724
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
719725

720726
.PHONY: generate-frontend
721-
generate-frontend: $(TAGS_PREREQ) generate-backend generate-swagger go-licenses
722-
727+
generate-frontend: $(TAGS_PREREQ) go-licenses
723728

724729
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
725730
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

0 commit comments

Comments
 (0)