summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-11 13:00:50 -0600
committermo khan <mo@mokhan.ca>2025-07-11 13:00:50 -0600
commit7659e433eb73e1f33ddac49537bfa5dfaa124875 (patch)
treed6c90f4c82b02ded848531c0a08124f1551fd957 /Makefile
parentef572ae666732e87a35417710669ce88233a754a (diff)
refactor: merge the server and cli into a single binary
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 8 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 1c1bff8d..82d6f5a7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
AUTHZD_BIN := bin/authzd
-CLI_BIN := bin/cli
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/\//_/g')
PROJECT_NAME := $(shell basename $(shell pwd))
IMAGE_TAG := $(PROJECT_NAME):$(GIT_BRANCH)
@@ -19,12 +18,8 @@ $(AUTHZD_BIN): $(shell find src -name "*.rs" 2>/dev/null) Cargo.toml
@cargo build --bin authzd --offline
@cp target/debug/authzd bin/authzd
-$(CLI_BIN): $(shell find src -name "*.rs" 2>/dev/null) Cargo.toml
- @cargo build --bin cli --offline
- @cp target/debug/cli bin/cli
-
# Cargo targets
-build: $(AUTHZD_BIN) $(CLI_BIN)
+build: $(AUTHZD_BIN)
check:
@cargo check
@@ -36,7 +31,7 @@ run: build
@minit
clean:
- @rm -f $(AUTHZD_BIN) $(CLI_BIN)
+ @rm -f $(AUTHZD_BIN)
@cargo clean
fmt:
@@ -76,10 +71,10 @@ check-gitlab-token:
exit 1; \
fi
-staging-entities: $(CLI_BIN) check-gitlab-token
- @$(CLI_BIN) generate --host https://staging.gitlab.com --project authorization/sparkle/team --output etc/authzd/staging.gitlab.com/authorization/sparkle/team/entities.json
+staging-entities: $(AUTHZD_BIN) check-gitlab-token
+ @$(AUTHZD_BIN) generate --host https://staging.gitlab.com --project authorization/sparkle/team --output etc/authzd/staging.gitlab.com/authorization/sparkle/team/entities.json
-production-entities: $(CLI_BIN) check-gitlab-token
- @$(CLI_BIN) generate --project gitlab-org/gitlab --output etc/authzd/gitlab.com/gitlab-org/gitlab/entities.json
- @$(CLI_BIN) generate --project gitlab-org/software-supply-chain-security/authorization/authzd --output etc/authzd/gitlab.com/gitlab-org/software-supply-chain-security/authorization/authzd/entities.json
- @$(CLI_BIN) generate --project gitlab-org/software-supply-chain-security/authorization/sparkled --output etc/authzd/gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/entities.json
+production-entities: $(AUTHZD_BIN) check-gitlab-token
+ @$(AUTHZD_BIN) generate --project gitlab-org/gitlab --output etc/authzd/gitlab.com/gitlab-org/gitlab/entities.json
+ @$(AUTHZD_BIN) generate --project gitlab-org/software-supply-chain-security/authorization/authzd --output etc/authzd/gitlab.com/gitlab-org/software-supply-chain-security/authorization/authzd/entities.json
+ @$(AUTHZD_BIN) generate --project gitlab-org/software-supply-chain-security/authorization/sparkled --output etc/authzd/gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/entities.json