forked from agentgateway/agentgateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 1014 Bytes
/
Copy pathMakefile
File metadata and controls
49 lines (40 loc) · 1014 Bytes
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
# Image configuration
DOCKER_REGISTRY ?= ghcr.io
DOCKER_REPO ?= agentgateway
IMAGE_NAME ?= agentgateway
VERSION ?= $(shell git describe --tags --always --dirty)
IMAGE_TAG ?= $(VERSION)
IMAGE_FULL_NAME ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
DOCKER_BUILDER ?= docker
DOCKER_BUILD_ARGS ?=
KIND_CLUSTER_NAME ?= agentgateway
# docker
.PHONY: docker
docker:
$(DOCKER_BUILDER) build $(DOCKER_BUILD_ARGS) -t $(IMAGE_FULL_NAME) .
.PHONY: docker-ext
docker-ext:
$(DOCKER_BUILDER) build $(DOCKER_BUILD_ARGS) -t $(IMAGE_FULL_NAME)-ext -f Dockerfile.ext .
CARGO_BUILD_ARGS ?=
# build
.PHONY: build
build:
cargo build --release --features ui $(CARGO_BUILD_ARGS)
# lint
.PHONY: lint
lint:
cargo fmt --check
cargo clippy --all-targets -- -D warnings
# test
.PHONY: test
test:
cargo test --all-targets
# clean
.PHONY: clean
clean:
cargo clean
objects := $(wildcard examples/*/config.json)
.PHONY: validate
validate: $(objects)
%/config.json:
cargo run -- --mode=validate -f $*/config.json