magnetico/Makefile

43 lines
1.3 KiB
Makefile
Raw Normal View History

2018-08-27 10:15:01 +02:00
.PHONY: test format magneticod magneticow ensure test-magneticod test-magneticow test-persistence image image-magneticow image-magneticod
2018-08-07 09:31:26 +02:00
all: ensure test magneticod magneticow
magneticod:
2018-08-27 10:15:01 +02:00
go install --tags fts5 "-ldflags=-s -w" github.com/boramalper/magnetico/cmd/magneticod
magneticow:
# TODO: minify files!
go-bindata -o="cmd/magneticow/bindata.go" -prefix="cmd/magneticow/data/" -pkg="main" cmd/magneticow/data/...
2018-08-27 10:15:01 +02:00
go install --tags fts5 "-ldflags=-s -w" github.com/boramalper/magnetico/cmd/magneticow
2018-08-27 10:15:01 +02:00
image-magneticod:
docker build -t magneticod -f Dockerfile.magneticod .
image-magneticow:
docker build -t magneticow -f Dockerfile.magneticow .
image: image-magneticod image-magneticow
# Download dependencies
ensure:
dep ensure -v
go get -u github.com/jteeuwen/go-bindata/...
2018-08-27 10:15:01 +02:00
test-magneticod:
go test github.com/boramalper/magnetico/cmd/magneticod/...
2018-08-27 10:15:01 +02:00
test-magneticow:
go-bindata -o="cmd/magneticow/bindata.go" -prefix="cmd/magneticow/data/" -pkg="main" cmd/magneticow/data/...
go test github.com/boramalper/magnetico/cmd/magneticow/...
2018-08-27 10:15:01 +02:00
test-persistence:
go test github.com/boramalper/magnetico/pkg/persistence/...
2018-08-27 10:15:01 +02:00
test: test-persistence test-magneticod test-magneticow
format:
gofmt -w cmd/magneticod
gofmt -w cmd/magneticow
gofmt -w pkg/persistence