Migrate to a better architectured project
This commit is contained in:
parent
cc5ed5f23e
commit
b1b9eaa028
21 changed files with 2712 additions and 1540 deletions
32
Makefile
Normal file
32
Makefile
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
.PHONY: build run clean install test
|
||||
|
||||
BINARY_NAME=repeater
|
||||
CMD_PATH=./cmd/repeater
|
||||
BUILD_DIR=.
|
||||
|
||||
build:
|
||||
go build -v -o $(BUILD_DIR)/$(BINARY_NAME) $(CMD_PATH)
|
||||
|
||||
run: build
|
||||
sudo ./$(BINARY_NAME)
|
||||
|
||||
clean:
|
||||
go clean
|
||||
rm -f $(BUILD_DIR)/$(BINARY_NAME)
|
||||
|
||||
install: build
|
||||
sudo install -m 755 $(BUILD_DIR)/$(BINARY_NAME) /usr/local/bin/
|
||||
|
||||
test:
|
||||
go test -v ./...
|
||||
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
all: fmt vet build
|
||||
Loading…
Add table
Add a link
Reference in a new issue