-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (36 loc) · 1.15 KB
/
Makefile
File metadata and controls
47 lines (36 loc) · 1.15 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
BINARY=bin/archway
ENGINE_SRC=engine/target/release/archway-engine
ENGINE_EMBED_DIR=internal/engineclient/bin
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
.PHONY: build engine test lint vet clean release snapshot install-local help
engine:
cd engine && cargo build --release
mkdir -p $(ENGINE_EMBED_DIR)
cp $(ENGINE_SRC) $(ENGINE_EMBED_DIR)/archway-engine-$(GOOS)-$(GOARCH)
build: engine
go build -o $(BINARY) ./cmd/archway
test:
go test ./...
lint:
golangci-lint run
clean:
rm -rf bin/ internal/engineclient/bin/
release:
goreleaser release
snapshot:
goreleaser release --snapshot --clean
vet:
go vet ./...
install-local:
go install ./cmd/archway
help:
@echo "engine Build Rust engine for current platform ($(GOOS)/$(GOARCH))"
@echo "build Build binary to bin/archway (runs engine first)"
@echo "test Run all tests"
@echo "lint Run golangci-lint"
@echo "vet Run go vet"
@echo "clean Remove build artifacts"
@echo "release Create a release with GoReleaser"
@echo "snapshot Create a snapshot release (no publish)"
@echo "install-local Install to GOPATH/bin"