diff --git a/.gitignore b/.gitignore index 93fe42cb52..281b2bb721 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ [568a].out _cgo_* core +web/blob/files.go diff --git a/Makefile b/Makefile index 9dc694f154..b2f9b6cc7e 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,14 @@ test: build go test ./... build: + ./utility/embed-static.sh web/static web/templates | gofmt > web/blob/files.go + cat web/blob/files.go $(MAKE) -C model go build ./... go build -o prometheus.build clean: + rm -rf web/static/blob/files.go rm -rf $(TEST_ARTIFACTS) $(MAKE) -C model clean -find . -type f -iname '*~' -exec rm '{}' ';' diff --git a/Makefile.TRAVIS b/Makefile.TRAVIS index c9ee349185..b92d80dc43 100644 --- a/Makefile.TRAVIS +++ b/Makefile.TRAVIS @@ -41,7 +41,7 @@ preparation-stamp: build-dependencies build-dependencies: build-dependencies-stamp -build-dependencies-stamp: bison cc mercurial protoc goprotobuf gorest go instrumentation leveldb levigo skiplist +build-dependencies-stamp: bison cc mercurial protoc goprotobuf gorest go instrumentation leveldb levigo skiplist vim-common touch $@ overlay: overlay-stamp @@ -144,6 +144,12 @@ rsync: rsync-stamp rsync-stamp: [ -x "$$(which rsync)" ] || $(APT_GET_INSTALL) rsync +vim-common: vim-common-stamp + +vim-common-stamp: + $(APT_GET_INSTALL) vim-common + touch $@ + test: test-stamp test-stamp: preparation source @@ -183,4 +189,4 @@ clean: -rm snappy-$(SNAPPY_VERSION).tar.gz -.PHONY: all bison build-dependencies cc clean go goprotobuf gorest instrumentation leveldb levigo mercurial overlay preparation protoc rsync snappy source test wget +.PHONY: all bison build-dependencies cc clean go goprotobuf gorest instrumentation leveldb levigo mercurial overlay preparation protoc rsync snappy source test wget vim-common diff --git a/utility/embed-static.sh b/utility/embed-static.sh new file mode 100755 index 0000000000..522610a01e --- /dev/null +++ b/utility/embed-static.sh @@ -0,0 +1,26 @@ +#!/bin/sh +set -x + +cat <