mirror of
https://github.com/Neur0toxine/bash.im-telegram-bot.git
synced 2024-11-22 05:06:10 +03:00
31 lines
499 B
Makefile
31 lines
499 B
Makefile
.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
|
|
|
|
build: fmt deps
|
|
@echo "- Building"
|
|
@cd $(SRC) && $(GO) build -o $(BIN)
|
|
@echo - Built "$(BIN)"
|
|
|
|
clean:
|
|
@echo Cleaning...
|
|
@rm -rf $(dir ${BIN})
|
|
|
|
test:
|
|
@echo Testing...
|
|
@$(GO) test $(SRC)
|
|
|
|
run:
|
|
@$(BIN)
|
|
|
|
deps:
|
|
@echo "- Installing dependencies"
|
|
@$(GO) mod tidy
|
|
|
|
fmt:
|
|
@echo "- Running 'go fmt'"
|
|
@$(GO) fmt $(SRC)
|