pgweb/Makefile

51 lines
1.5 KiB
Makefile
Raw Normal View History

2014-11-26 15:48:41 +03:00
BINDATA_IGNORE = $(shell git ls-files -io --exclude-standard $< | sed 's/^/-ignore=/;s/[.]/[.]/g')
2014-12-27 05:50:15 +03:00
usage:
@echo ""
@echo "Task : Description"
@echo "----------------- : -------------------"
@echo "make setup : Install all necessary dependencies"
@echo "make dev : Generate development build"
2014-12-27 05:51:04 +03:00
@echo "make test : Run tests"
2014-12-27 05:50:15 +03:00
@echo "make build : Generate production build for current OS"
@echo "make release : Generate binaries for all supported OSes"
@echo "make clean : Remove all build files and reset assets"
@echo "make assets : Generate production assets file"
@echo "make dev-assets : Generate development assets file"
2015-01-01 03:47:21 +03:00
@echo "make docker : Build docker image"
2014-12-27 05:50:15 +03:00
@echo ""
2014-12-18 06:39:03 +03:00
test:
godep go test
2014-11-26 15:48:41 +03:00
assets: static/
go-bindata $(BINDATA_OPTS) $(BINDATA_IGNORE) -ignore=[.]gitignore -ignore=[.]gitkeep $<...
2014-11-12 03:13:23 +03:00
dev-assets:
@$(MAKE) --no-print-directory assets BINDATA_OPTS="-debug"
dev: dev-assets
godep go build
@echo "You can now execute ./pgweb"
2014-11-12 03:13:23 +03:00
build: assets
godep go build
@echo "You can now execute ./pgweb"
release: assets
2014-10-27 23:26:14 +03:00
gox -osarch="darwin/amd64 darwin/386 linux/amd64 linux/386 windows/amd64 windows/386" -output="./bin/pgweb_{{.OS}}_{{.Arch}}"
2014-10-25 21:55:12 +04:00
setup:
go get github.com/tools/godep
2014-11-06 07:04:47 +03:00
godep get github.com/mitchellh/gox
godep get github.com/jteeuwen/go-bindata/...
godep restore
2014-10-11 02:32:47 +04:00
clean:
rm -f ./pgweb
2014-10-14 03:31:28 +04:00
rm -f ./bin/*
rm -f bindata.go
make assets
2014-11-06 03:27:14 +03:00
docker:
docker build -t pgweb .