Last active
September 9, 2018 18:12
-
-
Save ariefrahmansyah/77d9965da6c7b6073007d4450e901cc1 to your computer and use it in GitHub Desktop.
Go's Simple Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GO=go | |
| GOBUILD=${GO} build | |
| GOINSTALL=${GO} install | |
| GOTEST=${GO} test | |
| GODEP=dep | |
| export NOW=$(shell date +'%FT%T%z') | |
| ROOT_PATH="github.com/ariefrahmansyah" | |
| APP_NAME="[MY-AWESOME-APP]" | |
| all: test build run | |
| get-deps: | |
| @echo "${NOW} UPDATING..." | |
| @${GODEP} ensure -v | |
| test: | |
| @echo "${NOW} TESTING..." | |
| @${GOTEST} -v -cover -race ./... | |
| build: | |
| @echo "${NOW} BUILDING ${APP_NAME}..." | |
| @${GOBUILD} -race -o ${APP_NAME} ./cmd/${APP_NAME} | |
| run: | |
| @echo "${NOW} RUNNING..." | |
| @./${APP_NAME} | |
| install: | |
| @echo "${NOW} INSTALLING ${APP_NAME}..." | |
| @${GOINSTALL} ./cmd/${APP_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment