From 7d62eabbd8391deb94b5f26c0343e1c09ce9226f Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Fri, 30 Sep 2016 10:36:34 -0400 Subject: [PATCH] build: speed up go generate: don't run ui tests Previously, go generate would not only generate all of the protobufs and embedded.go, but also run the ui linters and tests. This is pretty slow and not really relevant to go generate. Now, go generate only generates files. CI has been updated to run the ui tests if necessary. --- ui/Makefile | 5 +++++ ui/ui.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/Makefile b/ui/Makefile index 691c59e04cb4..2ef327ec4a38 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -56,6 +56,11 @@ GOBINDATA_TARGET = embedded.go .PHONY: all all: lint test $(GOBINDATA_TARGET) +# Running `go generate` will call this target. Update this if you add new +# generated files. +.PHONY: generate +generate: $(GOBINDATA_TARGET) + # TODO(tamird): is there a way to not repeat this here? It's already in protobuf.mk app/js/protos.js generated/protos.json generated/protos.d.ts: $(addprefix $(REPO_ROOT)/, $(sort $(shell cd $(REPO_ROOT) && git ls-files --exclude-standard --cached --others -- '*.proto'))) $(MAKE) -C $(ORG_ROOT) -f cockroach/build/protobuf.mk diff --git a/ui/ui.go b/ui/ui.go index bc1cf58e7c6a..ee920f2abeae 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -18,4 +18,4 @@ // stylesheets. package ui -//go:generate make +//go:generate make generate