diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-02 17:58:24 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-02 18:35:20 -0600 |
| commit | 4351c74c7c5f97156bc94d3a8549b9940ac80e3f (patch) | |
| tree | 782542be4e438d264a88b4e19efa8fcedfdc5a0e /Makefile | |
| parent | bcafdf918489485aca2b405109187e66f2e645d5 (diff) | |
feat: implement cargo vendor and optimize Docker builds
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -2,15 +2,15 @@ PROJECT_NAME := $(shell basename $(shell pwd)) GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/\//_/g') IMAGE_TAG := $(PROJECT_NAME):$(GIT_BRANCH) -.PHONY: build check test run clean fmt lint doc +.PHONY: build check test run clean fmt lint doc vendor .PHONY: build-image run-image health-check list-services test-grpc setup: @rustup component add clippy rustfmt # Cargo targets -build: - @cargo build +build: vendor + @cargo build --offline check: @cargo check @@ -19,7 +19,7 @@ test: @cargo test run: - @cargo run + @cargo run --offline clean: @cargo clean @@ -33,8 +33,14 @@ lint: doc: @cargo doc --open +vendor: + @cargo vendor + # Docker targets -build-image: +build-image: vendor + @docker build --tag $(IMAGE_TAG) . + +build-image-clean: @docker build --no-cache --tag $(IMAGE_TAG) . run-image: build-image @@ -43,3 +49,6 @@ run-image: build-image # gRPC testing targets health-check: @grpcurl -plaintext localhost:50051 grpc.health.v1.Health/Check + +list-services: + @grpcurl -plaintext localhost:50051 list |
