summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-18 17:11:42 -0600
committermo khan <mo@mokhan.ca>2025-06-18 17:11:42 -0600
commit2694c82d97005ca39f29f540e26249c18a21f6d6 (patch)
tree259be3c918a047e26fb357b406d915315aa0ead5 /Makefile
parentc2b8edab01b23fde6cc196a3349ad6aa19a93299 (diff)
refactor: switch to a pure rust implementation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 17 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 028279a6..ab0140fe 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,17 @@
-default: install-tools
- @mage -l
-
-install-tools:
- @cargo install --keep-going cedar-policy-cli
- @go install tool
- @command -v cedar
- @command -v mage
- @command -v protoc-gen-go
- @command -v protoc-gen-go-grpc
- @command -v protoc-gen-twirp_ruby
+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: clean run-image
+
+.PHONY: clean
+clean:
+ @cargo clean
+
+.PHONY: build-image
+build-image:
+ @docker build --no-cache --tag $(IMAGE_TAG) .
+
+.PHONY: run-image
+run-image: build-image
+ @docker run --rm -p 50051:50051 -it $(IMAGE_TAG)