diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -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) |
