-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.19 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: help build run docker-build docker-up docker-down docker-restart clean lint test
# Default target
help:
@echo "Available commands:"
@echo " build - Build the Go application"
@echo " run - Run the Go application locally"
@echo " docker-build - Build Docker image"
@echo " docker-up - Start docker-compose services"
@echo " docker-up-detach - Start docker-compose services detach mode"
@echo " docker-down - Stop docker-compose services"
@echo " docker-restart - Restart docker-compose services"
@echo " clean - Clean build artifacts"
@echo " lint - Run linter (if available)"
@echo " test - Run tests"
# Go commands
build:
go build -o bin/webauthn-example .
run:
go run .
# Docker commands
docker-build:
docker-compose build
docker-up:
docker-compose up
docker-up-detach:
docker-compose up -d
docker-down:
docker-compose down
docker-restart: docker-down docker-up
# Development commands
clean:
rm -rf bin/
go clean
lint:
@if command -v golangci-lint >/dev/null 2>&1; then \
golangci-lint run; \
else \
echo "golangci-lint not installed, skipping lint"; \
fi
test:
go test ./...