aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Abhinav Gupta <mail@abhinavg.net> 2019-01-03 13:55:15 -0800
committerGravatar GitHub <noreply@github.com> 2019-01-03 13:55:15 -0800
commit2bf0f688f895aa19f976051e30b967a6187e27b4 (patch)
tree6e3425e59eafaf05546e348bd2182a08a7fbe0f0 /Makefile
parenta3b25c3f7761b0c8d4cd3871e335a32a929f8dda (diff)
downloadsally-2bf0f688f895aa19f976051e30b967a6187e27b4.tar.gz
sally-2bf0f688f895aa19f976051e30b967a6187e27b4.tar.zst
sally-2bf0f688f895aa19f976051e30b967a6187e27b4.zip
template: Bundle in binary with bindata (#36)
This uses go-bindata/go-bindata to bundle the template in the binary. I also realized that the handler test was now broken because we were checking the exact contents of the index page in the test. This change fixes that too.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7c25a34..efa0d0a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
GOLINT = go run github.com/golang/lint/golint
STATICCHECK = go run honnef.co/go/tools/cmd/staticcheck
+GOBINDATA = go run github.com/go-bindata/go-bindata/go-bindata
.PHONY: all
all: test
@@ -8,6 +9,12 @@ all: test
build:
go build
+.PHONY: generate
+generate: bindata.go
+
+bindata.go: templates/*
+ $(GOBINDATA) templates
+
.PHONY: install
install:
go install .