diff options
author | Paramtamtam <[email protected]> | 2020-12-08 11:43:25 +0500 |
---|---|---|
committer | Paramtamtam <[email protected]> | 2020-12-08 11:43:25 +0500 |
commit | bd60c9401c8873f317cedafbf11ebbe531f7292c (patch) | |
tree | 358809185b1fe6a2a49e5cf7e9b48ad2b51f1e74 /Makefile | |
parent | 23a0215378c6181e245821c88602c1d49a1914e4 (diff) |
WIP
Diffstat (limited to 'Makefile')
-rwxr-xr-x[-rw-r--r--] | Makefile | 40 |
1 files changed, 27 insertions, 13 deletions
@@ -1,16 +1,29 @@ -build: - @./build.sh -all: - @./build.sh all -clean: - rm -rf rr -install: all +#!/usr/bin/make +# Makefile readme (ru): <http://linux.yaroslavl.ru/docs/prog/gnu_make_3-79_russian_manual.html> +# Makefile readme (en): <https://www.gnu.org/software/make/manual/html_node/index.html#SEC_Contents> + +SHELL = /bin/sh + +.DEFAULT_GOAL := build + +# This will output the help for each task. thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +help: ## Show this help + @printf "\033[33m%s:\033[0m\n" 'Available commands' + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +build: ## Build RR binary file for local os/arch + CGO_ENABLED=0 go build -trimpath -ldflags "-s" -o ./rr ./cmd/rr/main.go + +clean: ## Make some clean + rm ./rr + +install: build ## Build and install RR locally cp rr /usr/local/bin/rr -uninstall: + +uninstall: ## Uninstall locally installed RR rm -f /usr/local/bin/rr -test: - composer update - go test -v -race -cover + +test: ## Run application tests go test -v -race -cover ./util go test -v -race -cover ./service go test -v -race -cover ./service/env @@ -23,6 +36,7 @@ test: go test -v -race -cover ./service/health go test -v -race -cover ./service/gzip go test -v -race -cover ./service/reload -lint: + +lint: ## Run application linters go fmt ./... - golint ./...
\ No newline at end of file + golint ./... |