Skip to content

Commit f00a3e4

Browse files
authored
Merge pull request #40 from weaveworks/manual-asset-build
Make web-asset build step manual.
2 parents 71c43a2 + 945e6a8 commit f00a3e4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ NETGO_CHECK = @strings $@ | grep cgo_stub\\\.go >/dev/null || { \
5353

5454
ifeq ($(BUILD_IN_CONTAINER),true)
5555

56-
$(EXES) lint test $(STATIC): prism-build/$(UPTODATE)
56+
$(EXES) lint test assets: prism-build/$(UPTODATE)
5757
@mkdir -p $(shell pwd)/.pkg
5858
$(SUDO) docker run $(RM) -ti \
5959
-v $(shell pwd)/.pkg:/go/pkg \
@@ -63,7 +63,6 @@ $(EXES) lint test $(STATIC): prism-build/$(UPTODATE)
6363
else
6464

6565
$(EXES): prism-build/$(UPTODATE)
66-
go-bindata -pkg ui -o ui/bindata.go -ignore '(.*\.map|bootstrap\.js|bootstrap-theme\.css|bootstrap\.css)' ui/templates/... ui/static/...
6766
go build $(GO_FLAGS) -o $@ ./$(@D)
6867
$(NETGO_CHECK)
6968

@@ -73,6 +72,15 @@ lint: prism-build/$(UPTODATE)
7372
test: prism-build/$(UPTODATE)
7473
./tools/test -no-go-get
7574

75+
# Manual step that needs to be run after making any changes to the web assets
76+
# (ui/{templates,static}/...).
77+
#
78+
# TODO(juliusv): Figure out if we can make this an automatic part of the build
79+
# process. It currently produces diffs (source file timestamps are getting
80+
# baked into bindata.go) and those make CI fail.
81+
assets: prism-build/$(UPTODATE)
82+
go-bindata -pkg ui -o ui/bindata.go -ignore '(.*\.map|bootstrap\.js|bootstrap-theme\.css|bootstrap\.css)' ui/templates/... ui/static/...
83+
7684
endif
7785

7886
clean:

0 commit comments

Comments
 (0)