bash.im-telegram-bot/Makefile

32 lines
515 B
Makefile
Raw Permalink Normal View History

2019-06-09 12:42:12 +03:00
.DEFAULT_GOAL := build
GO=$(shell which go)
PROJECT_DIR=$(shell pwd)
GOPATH=$(PROJECT_DIR)
SRC=$(PROJECT_DIR)/src
BIN=$(PROJECT_DIR)/bin/bash_im_bot
2019-06-09 20:38:26 +03:00
GO111MODULE=on
2019-06-09 12:42:12 +03:00
build: fmt deps
@echo "- Building"
@cd $(SRC) && $(GO) build -o $(BIN)
2019-06-09 12:58:37 +03:00
@echo - Built "$(BIN)"
clean:
@echo Cleaning...
@rm -rf $(dir ${BIN})
2019-06-09 12:42:12 +03:00
2019-06-09 20:27:15 +03:00
test:
@echo Testing...
@$(GO) test $(SRC)
2019-06-09 12:42:12 +03:00
run:
@$(BIN)
deps:
@echo "- Installing dependencies"
@$(GO) mod tidy
fmt:
@echo "- Running 'go fmt'"
@$(GO) fmt $(SRC)