nat/Makefile
Patrik Martinsson 825fffe502 Initial commit of pastebin fork
It's quite big rewrite and indivdual commits are not available since
its so big. Introducing features like,
- Support for multiple database backends and configurations like
  dbname/tablename/ports/adresses/etc.
- Support for dynamically adding languages and lexers from pygments,
  autodetection of language is also supported.
- Support for changing styles (and languages) on the fly, also row-highlightning
  and rownumbers.
- Support for showing information about when paste expires.
- Support for goo.gl-shortener.
- Extreme debugging =)
- Probably added a few bugs in there as well =)
2016-12-18 15:12:24 +01:00

36 lines
840 B
Makefile

## simple makefile to log workflow
.PHONY: all test clean build install
GOFLAGS ?= $(GOFLAGS:)
dbtype=$(shell grep dbtype config.json | cut -d \" -f 4)
dbname=$(shell grep dbname config.json | cut -d \" -f 4)
dbtable=$(shell grep dbtable config.json | cut -d \" -f 4)
all: clean install build
build:
gofmt -w pastebin.go
go build $(GOFLAGS) ./...
ifeq ($(dbtype),sqlite3)
cat database.sql | sed 's/pastebin/$(dbtable)/' | sqlite3 $(dbname)
endif
install:
go get github.com/dchest/uniuri
go get github.com/ewhal/pygments
go get github.com/mattn/go-sqlite3
go get github.com/gorilla/mux
go get github.com/go-sql-driver/mysql
go get github.com/lib/pq
test: install
go install $(GOFLAGS) ./...
bench: install
go test -run=NONE -bench=. $(GOFLAGS) ./...
clean:
go clean $(GOFLAGS) -i ./...
rm -rf ./build
rm -rf pastebin.db