wip
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
.PHONY: build run test tidy lint docker hash-password
|
||||
|
||||
## build: compile the binary
|
||||
build:
|
||||
go build -o bin/davserver ./cmd/server
|
||||
|
||||
## run: run the server locally
|
||||
run: build
|
||||
./bin/davserver -config config.yaml
|
||||
|
||||
## test: run all tests
|
||||
test:
|
||||
go test ./... -v -race
|
||||
|
||||
## tidy: tidy go modules
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
## lint: run golangci-lint
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
## docker: build Docker image
|
||||
docker:
|
||||
docker build -t davserver:latest .
|
||||
|
||||
## compose: start with Docker Compose
|
||||
compose:
|
||||
docker compose up --build
|
||||
|
||||
## hash-password: generate bcrypt hash for a password
|
||||
## Usage: make hash-password PWD=mysecret
|
||||
hash-password:
|
||||
@go run -v ./tools/hashpwd $(PWD)
|
||||
Reference in New Issue
Block a user