summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-11 11:38:45 -0600
committermo khan <mo@mokhan.ca>2025-04-11 11:38:45 -0600
commit23d00ba6c51c2efad3031429650fa0f5b3d38d5d (patch)
treefa9ead70b3c67eda0af62033d1f3d6cf49c75a61
parent0f18f887b4608f7a9923440bafcd04c9efdd7617 (diff)
docs: update README instructions to use make
-rw-r--r--Makefile19
-rw-r--r--README.md4
2 files changed, 13 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index eb0c720..311387f 100644
--- a/Makefile
+++ b/Makefile
@@ -2,30 +2,33 @@ 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-test-image integration-test
+.PHONY: clean setup build test run
sparkled:
- go build -o sparkled ./cmd/sparkled/main.go
+ @go build -o sparkled ./cmd/sparkled/main.go
clean:
- rm -f sparkled
+ @rm -f sparkled
+
+setup:
+ @mise install
build: sparkled
test:
- go test ./...
+ @go test ./...
build-image:
- docker build --tag $(IMAGE_TAG) .
+ @docker build --tag $(IMAGE_TAG) .
build-builder-image:
- docker build --target build --tag $(IMAGE_TAG) .
+ @docker build --target build --tag $(IMAGE_TAG) .
run: build
BIND_ADDR=:8080 ./sparkled
run-image: build-image
- docker run -it $(IMAGE_TAG)
+ @docker run -it $(IMAGE_TAG)
sh-image: build-builder-image
- docker run -it $(IMAGE_TAG) /bin/sh
+ @docker run -it $(IMAGE_TAG) /bin/sh
diff --git a/README.md b/README.md
index a95ba23..877b36a 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,6 @@ The Authorization team is researching ways to evolve GitLab's authorization stac
## Getting Started
```bash
-mise install
-go run ./cmd/sparkled/main.go
+make setup
+make run
```