github.com/webonyx/up@v0.7.4-0.20180808230834-91b94e551323/Makefile (about) 1 2 GO ?= go 3 4 # Build all files. 5 build: 6 @echo "==> Building" 7 @$(GO) generate ./... 8 .PHONY: build 9 10 # Install from source. 11 install: 12 @echo "==> Installing up ${GOPATH}/bin/up" 13 @$(GO) install ./... 14 .PHONY: install 15 16 # Install the development dependencies. 17 install.deps: 18 @echo "==> Installing dev dependencies" 19 @$(GO) get -u rsc.io/gt 20 @$(GO) get -u github.com/jteeuwen/go-bindata/... 21 @$(GO) get -u github.com/pointlander/peg 22 .PHONY: install.deps 23 24 # Run all tests. 25 test: internal/proxy/bin/bin_assets.go 26 @$(GO) test -timeout 2m ./... && echo "\n==>\033[32m Ok\033[m\n" 27 .PHONY: test 28 29 # Run all tests in CI. 30 test.ci: internal/proxy/bin/bin_assets.go 31 @$(GO) test -v -timeout 5m ./... && echo "\n==>\033[32m Ok\033[m\n" 32 .PHONY: test.ci 33 34 internal/proxy/bin/bin_assets.go: 35 @$(GO) generate ./... 36 37 # Show source statistics. 38 cloc: 39 @cloc -exclude-dir=vendor,node_modules . 40 .PHONY: cloc 41 42 # Release binaries to GitHub. 43 release: build 44 @echo "==> Releasing" 45 @goreleaser -p 1 --rm-dist -config .goreleaser.yml --skip-publish 46 @echo "==> Renaming" 47 @sh scripts/release.sh 48 @echo "==> Publishing" 49 @AWS_REGION=us-west-2 AWS_PROFILE=apex apex-release add up pro --version $(shell git describe --tag | tr -d 'v' | sed 's/-pro//') dist/*.tar.gz dist/*.txt 50 @echo "==> Complete" 51 .PHONY: release 52 53 # Show to-do items per file. 54 todo: 55 @rg TODO: 56 .PHONY: todo 57 58 # Show size of imports. 59 size: 60 @curl -sL https://gist.githubusercontent.com/tj/04e0965e23da00ca33f101e5b2ed4ed4/raw/9aa16698b2bc606cf911219ea540972edef05c4b/gistfile1.txt | bash 61 .PHONY: size 62 63 # Clean. 64 clean: 65 @rm -fr \ 66 dist \ 67 internal/proxy/bin/bin_assets.go \ 68 internal/shim/bindata.go 69 .PHONY: clean 70 71 # Backup repository. 72 backup: 73 @git push -f tj-backup 74 .PHONY: backup