aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0f4812c..8cc8884 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,14 @@
## Use of this source code is governed by a BSD-style
## license that can be found in the LICENSE file.
-.PHONY: all build lint test install deploy
+.PHONY: all build lint test install generate deploy
LINT_OPTS =
+GENERATE_INPUTS = _content/index.html \
+ _content/index.js \
+ _content/kbbiclient.js
+
all: build lint test
build:
@@ -27,7 +31,10 @@ test:
install:
go install ./cmd/kbbi/
-deploy:
+cmd/www-kbbi/static.go: $(GENERATE_INPUTS)
+ go generate
+
+deploy: cmd/www-kbbi/static.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -o www-kbbi-linux-amd64 ./cmd/www-kbbi/
rsync --progress ./www-kbbi-linux-amd64 www-kbbi:~/bin/www-kbbi