github.com/motyar/up@v0.2.10/Makefile (about) 1 2 GO ?= go 3 4 # Build all files. 5 build: 6 @echo "==> Building" 7 @rm -f internal/proxy/bin/bin_assets.go 8 @$(GO) generate ./... 9 .PHONY: build 10 11 # Install from source. 12 install: 13 @echo "==> Installing up ${GOPATH}/bin/up" 14 @$(GO) install ./... 15 .PHONY: install 16 17 # Install the development dependencies. 18 install.deps: 19 @echo "==> Installing dev dependencies" 20 @$(GO) get -u rsc.io/gt 21 @$(GO) get -u github.com/jteeuwen/go-bindata/... 22 @$(GO) get -u github.com/pointlander/peg/... 23 .PHONY: install.deps 24 25 # Run all tests. 26 test: 27 @$(GO) test -timeout 2m ./... && echo "\n==>\033[32m Ok\033[m\n" 28 .PHONY: test 29 30 # Run all tests in CI. 31 test.ci: 32 @$(GO) test -timeout 2m -race ./... && echo "\n==>\033[32m Ok\033[m\n" 33 .PHONY: test.ci 34 35 # Show source statistics. 36 cloc: 37 @cloc -exclude-dir=vendor,node_modules . 38 .PHONY: cloc 39 40 # Release binaries to GitHub. 41 release: 42 @echo "==> Releasing" 43 @goreleaser -p 1 --rm-dist -config .goreleaser.yml 44 @echo "==> Complete" 45 .PHONY: release 46 47 # Show to-do items per file. 48 todo: 49 @grep \ 50 --exclude-dir=vendor \ 51 --exclude-dir=node_modules \ 52 --text \ 53 --color \ 54 -nRo -E ' TODO:.*|SkipNow' . 55 .PHONY: todo 56 57 # Show size of imports. 58 size: 59 @curl -sL https://gist.githubusercontent.com/tj/04e0965e23da00ca33f101e5b2ed4ed4/raw/9aa16698b2bc606cf911219ea540972edef05c4b/gistfile1.txt | bash 60 .PHONY: size 61 62 # Clean. 63 clean: 64 @rm -fr dist 65 .PHONY: clean