aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2018-07-07 10:57:27 -0700
committerAdam Mathes <adam@trenchant.org>2018-07-07 10:57:27 -0700
commit9e1c4fbb9901082f6437d3bd7f2e235e98e5c4ac (patch)
treed749057a0275a934d14408b44b15e7a10e9b74f0
parentc7a4ff975c63cfd6d19eeb5bc56c477e0fe8f906 (diff)
downloadneko-9e1c4fbb9901082f6437d3bd7f2e235e98e5c4ac.tar.gz
neko-9e1c4fbb9901082f6437d3bd7f2e235e98e5c4ac.tar.bz2
neko-9e1c4fbb9901082f6437d3bd7f2e235e98e5c4ac.zip
update makefile for docs/releases
-rw-r--r--Makefile26
1 files changed, 15 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 237e631..7cdbd93 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,22 @@
+BINARY=neko
+VERSION=0.2
+BUILD=`git rev-parse HEAD`
+
+LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}"
+
+
SOURCES = $(wildcard *.go) $(wildcard */*.go)
BINARIES = nekoweb nekocrawl
-DEPS = github.com/mmcdole/gofeed github.com/abbot/go-http-auth github.com/axgle/mahonia github.com/go-sql-driver/mysql github.com/microcosm-cc/bluemonday
-
-default: $(BINARIES)
+default: build
+all: clean build_all
-$(BINARIES): $(SOURCES)
- go build
+build:
+ go build ${LDFLAGS} -o ${BINARY}
-.PHONY: deps run
+install:
+ go install
-.PHONY: run
-deps:
- go get $(DEPS)
-run:
- ./neko -update -serve
+docs:
+ ghmarkdown README.md > readme.html