make: add an install target
This commit is contained in:
parent
21a506388a
commit
462d3c0c2c
1 changed files with 5 additions and 1 deletions
6
Makefile
6
Makefile
|
|
@ -1,8 +1,9 @@
|
||||||
.PHONY: help build run test clean lint lint-fix
|
.PHONY: help build run test clean lint lint-fix install
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Available commands:"
|
@echo "Available commands:"
|
||||||
@echo " make build - Build the application"
|
@echo " make build - Build the application"
|
||||||
|
@echo " make install - Install the binary to /usr/bin"
|
||||||
@echo " make run - Run the application"
|
@echo " make run - Run the application"
|
||||||
@echo " make test - Run tests"
|
@echo " make test - Run tests"
|
||||||
@echo " make lint - Run golangci-lint"
|
@echo " make lint - Run golangci-lint"
|
||||||
|
|
@ -12,6 +13,9 @@ help:
|
||||||
build:
|
build:
|
||||||
go build -o bin/fgj .
|
go build -o bin/fgj .
|
||||||
|
|
||||||
|
install: build
|
||||||
|
install -Dm755 bin/fgj /usr/bin/fgj
|
||||||
|
|
||||||
run:
|
run:
|
||||||
go run .
|
go run .
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue