aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2020-04-06 03:00:22 +0700
committerShulhan <m.shulhan@gmail.com>2020-04-06 03:00:22 +0700
commitdb5b35cd5052d47c81bb63f78f7781513be22fd2 (patch)
treec393a2aa937a0b576a9f25c10b76dd8967a90b02 /Makefile
parent5ea27bffa9020ddcdc62774a29e399e76ae5997c (diff)
downloadkamusku-db5b35cd5052d47c81bb63f78f7781513be22fd2.tar.xz
www-kbbi: add content page for "/project/kbbi"
The content page show the definition and capabilities of the API.
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