From 8a9ef513fa276a67885b3fa67503030dae571bed Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sat, 6 Apr 2019 10:44:06 -0400 Subject: [PATCH] Fix go-bindata error in Travis build Based on @sheenobu's work on #58 --- .gitignore | 1 + .travis.yml | 2 ++ Makefile | 14 ++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index 3d021d7..847e8f0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.swo build +tmp *.ini *.db diff --git a/.travis.yml b/.travis.yml index 0deb65f..1e58d6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,5 @@ go: env: - GO111MODULE=on + +script: make ci diff --git a/Makefile b/Makefile index 1b54328..88091f3 100644 --- a/Makefile +++ b/Makefile @@ -9,9 +9,13 @@ GOGET=$(GOCMD) get BINARY_NAME=writefreely DOCKERCMD=docker IMAGE_NAME=writeas/writefreely +TMPBIN=./tmp all : build +ci: ci-assets deps + cd cmd/writefreely; $(GOBUILD) -v -tags='sqlite' + build: assets deps cd cmd/writefreely; $(GOBUILD) -v -tags='sqlite' @@ -107,8 +111,18 @@ generate : $(GOGET) -u github.com/jteeuwen/go-bindata/...; \ fi +$(TMPBIN): + mkdir -p $(TMPBIN) + +$(TMPBIN)/go-bindata: deps $(TMPBIN) + $(GOBUILD) -o $(TMPBIN)/go-bindata github.com/jteeuwen/go-bindata/go-bindata + +ci-assets : $(TMPBIN)/go-bindata + $(TMPBIN)/go-bindata -pkg writefreely -ignore=\\.gitignore schema.sql sqlite.sql + clean : -rm -rf build + -rm -rf tmp cd less/; $(MAKE) clean $(MFLAGS) force_look :