step one
This commit is contained in:
parent
7a8d5d13fa
commit
9e663db9dc
68 changed files with 5647 additions and 2958 deletions
45
Makefile
45
Makefile
|
|
@ -1,12 +1,20 @@
|
|||
.PHONY: build run test fmt lint clean generate-ogen help
|
||||
.PHONY: build server cli compare test fmt lint clean generate-ogen docs help
|
||||
|
||||
# Build the application
|
||||
build:
|
||||
go build -o predictor ./cmd/api
|
||||
# Build all binaries
|
||||
build: server cli compare
|
||||
|
||||
server:
|
||||
go build -o bin/predictor ./cmd/predictor
|
||||
|
||||
cli:
|
||||
go build -o bin/predictor-cli ./cmd/predictor-cli
|
||||
|
||||
compare:
|
||||
go build -o bin/compare-tawhiri ./cmd/compare-tawhiri
|
||||
|
||||
# Run locally
|
||||
run:
|
||||
go run ./cmd/api
|
||||
go run ./cmd/predictor
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
|
|
@ -20,21 +28,28 @@ fmt:
|
|||
lint:
|
||||
golangci-lint run
|
||||
|
||||
# Generate ogen API code from swagger spec
|
||||
# Build the numerics LaTeX doc (requires pdflatex)
|
||||
docs:
|
||||
cd docs && pdflatex numerics.tex
|
||||
|
||||
# Regenerate ogen API code from the OpenAPI spec
|
||||
generate-ogen:
|
||||
go run github.com/ogen-go/ogen/cmd/ogen@latest --target pkg/rest --package rest --clean api/rest/predictor.swagger.yml
|
||||
|
||||
# Clean build artifacts
|
||||
clean:
|
||||
rm -f predictor
|
||||
rm -rf bin/ docs/numerics.pdf docs/numerics.aux docs/numerics.log
|
||||
|
||||
# Show help
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " build - Build binary"
|
||||
@echo " run - Run locally"
|
||||
@echo " test - Run tests"
|
||||
@echo " fmt - Format code"
|
||||
@echo " lint - Lint code"
|
||||
@echo " generate-ogen - Generate API code from swagger spec"
|
||||
@echo " clean - Remove build artifacts"
|
||||
@echo " build - Build all binaries to bin/"
|
||||
@echo " server - Build the HTTP server (cmd/predictor)"
|
||||
@echo " cli - Build the CLI client (cmd/predictor-cli)"
|
||||
@echo " compare - Build the validation tool (cmd/compare-tawhiri)"
|
||||
@echo " run - Run the server with default config"
|
||||
@echo " test - Run unit tests"
|
||||
@echo " fmt - Format code"
|
||||
@echo " lint - Lint code (golangci-lint)"
|
||||
@echo " docs - Build the numerics LaTeX doc (requires pdflatex)"
|
||||
@echo " generate-ogen - Regenerate ogen code from the OpenAPI spec"
|
||||
@echo " clean - Remove build artifacts"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue