2020-05-02 12:33:52 +02:00
|
|
|
IMAGE_BASE ?= kanidm
|
2020-08-06 08:05:33 +02:00
|
|
|
IMAGE_VERSION ?= devel
|
2024-06-27 08:24:39 +02:00
|
|
|
IMAGE_EXT_VERSION ?= $(shell cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "daemon") | .version')
|
2022-05-24 07:25:04 +02:00
|
|
|
CONTAINER_TOOL_ARGS ?=
|
2020-12-30 03:29:01 +01:00
|
|
|
IMAGE_ARCH ?= "linux/amd64,linux/arm64"
|
2022-05-26 13:13:07 +02:00
|
|
|
CONTAINER_BUILD_ARGS ?=
|
2022-12-26 23:52:03 +01:00
|
|
|
MARKDOWN_FORMAT_ARGS ?= --options-line-width=100
|
2022-05-23 08:37:41 +02:00
|
|
|
CONTAINER_TOOL ?= docker
|
2023-02-17 08:02:01 +01:00
|
|
|
BUILDKIT_PROGRESS ?= plain
|
2024-07-15 10:06:15 +02:00
|
|
|
KANIDM_FEATURES ?= ""
|
2023-07-05 14:26:39 +02:00
|
|
|
TESTS ?=
|
2022-03-09 23:55:44 +01:00
|
|
|
BOOK_VERSION ?= master
|
2023-08-14 02:06:53 +02:00
|
|
|
GIT_COMMIT := $(shell git rev-parse HEAD)
|
2022-03-09 23:55:44 +01:00
|
|
|
|
2020-05-02 12:33:52 +02:00
|
|
|
.DEFAULT: help
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: help
|
2020-05-02 12:33:52 +02:00
|
|
|
help:
|
2022-12-16 08:23:22 +01:00
|
|
|
@grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
2020-05-02 12:33:52 +02:00
|
|
|
|
2024-06-27 08:24:39 +02:00
|
|
|
|
|
|
|
.PHONY: config
|
|
|
|
config: ## Show makefile config things
|
|
|
|
config:
|
|
|
|
@echo "IMAGE_BASE: $(IMAGE_BASE)"
|
|
|
|
@echo "IMAGE_VERSION: $(IMAGE_VERSION)"
|
|
|
|
@echo "IMAGE_EXT_VERSION: $(IMAGE_EXT_VERSION)"
|
|
|
|
@echo "CONTAINER_TOOL_ARGS: $(CONTAINER_TOOL_ARGS)"
|
|
|
|
@echo "IMAGE_ARCH: $(IMAGE_ARCH)"
|
|
|
|
@echo "CONTAINER_BUILD_ARGS: $(CONTAINER_BUILD_ARGS)"
|
|
|
|
@echo "MARKDOWN_FORMAT_ARGS: $(MARKDOWN_FORMAT_ARGS)"
|
|
|
|
@echo "CONTAINER_TOOL: $(CONTAINER_TOOL)"
|
|
|
|
@echo "BUILDKIT_PROGRESS: $(BUILDKIT_PROGRESS)"
|
|
|
|
@echo "TESTS: $(TESTS)"
|
|
|
|
@echo "BOOK_VERSION: $(BOOK_VERSION)"
|
|
|
|
@echo "GIT_COMMIT: $(GIT_COMMIT)"
|
|
|
|
|
2023-07-05 14:26:39 +02:00
|
|
|
.PHONY: run
|
|
|
|
run: ## Run the test/dev server
|
|
|
|
run:
|
|
|
|
cd server/daemon && ./run_insecure_dev_server.sh
|
|
|
|
|
2024-10-23 08:04:38 +02:00
|
|
|
.PHONY: run_htmx
|
|
|
|
run_htmx: ## Run in HTMX mode
|
|
|
|
run_htmx:
|
|
|
|
cd server/daemon && KANI_CARGO_OPTS="--features kanidmd_core/ui_htmx" ./run_insecure_dev_server.sh
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: buildx/kanidmd
|
2022-06-20 12:16:55 +02:00
|
|
|
buildx/kanidmd: ## Build multiarch kanidm server images and push to docker hub
|
2023-02-17 08:02:01 +01:00
|
|
|
buildx/kanidmd:
|
2022-06-20 12:16:55 +02:00
|
|
|
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) \
|
|
|
|
--pull --push --platform $(IMAGE_ARCH) \
|
2023-03-02 03:47:23 +01:00
|
|
|
-f server/Dockerfile \
|
2022-06-20 12:16:55 +02:00
|
|
|
-t $(IMAGE_BASE)/server:$(IMAGE_VERSION) \
|
2023-05-25 05:42:18 +02:00
|
|
|
-t $(IMAGE_BASE)/server:$(IMAGE_EXT_VERSION) \
|
2023-02-17 08:02:01 +01:00
|
|
|
--progress $(BUILDKIT_PROGRESS) \
|
2021-03-26 02:22:00 +01:00
|
|
|
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
2024-07-15 10:06:15 +02:00
|
|
|
--build-arg "KANIDM_FEATURES=$(KANIDM_FEATURES)" \
|
2024-06-27 08:24:39 +02:00
|
|
|
--compress \
|
2023-08-14 02:06:53 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
2022-05-24 07:25:04 +02:00
|
|
|
$(CONTAINER_BUILD_ARGS) .
|
2020-07-24 09:38:59 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: buildx/kanidm_tools
|
2022-11-09 22:42:03 +01:00
|
|
|
buildx/kanidm_tools: ## Build multiarch kanidm tool images and push to docker hub
|
2023-02-17 08:02:01 +01:00
|
|
|
buildx/kanidm_tools:
|
2022-11-09 22:42:03 +01:00
|
|
|
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) \
|
|
|
|
--pull --push --platform $(IMAGE_ARCH) \
|
2023-03-02 03:47:23 +01:00
|
|
|
-f tools/Dockerfile \
|
2022-11-09 22:42:03 +01:00
|
|
|
-t $(IMAGE_BASE)/tools:$(IMAGE_VERSION) \
|
2023-05-25 05:42:18 +02:00
|
|
|
-t $(IMAGE_BASE)/tools:$(IMAGE_EXT_VERSION) \
|
2023-02-17 08:02:01 +01:00
|
|
|
--progress $(BUILDKIT_PROGRESS) \
|
2022-11-09 22:42:03 +01:00
|
|
|
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
2024-07-15 10:06:15 +02:00
|
|
|
--build-arg "KANIDM_FEATURES=$(KANIDM_FEATURES)" \
|
2023-08-14 02:06:53 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
2022-11-09 22:42:03 +01:00
|
|
|
$(CONTAINER_BUILD_ARGS) .
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: buildx/radiusd
|
2022-06-20 12:16:55 +02:00
|
|
|
buildx/radiusd: ## Build multi-arch radius docker images and push to docker hub
|
2020-08-17 09:16:33 +02:00
|
|
|
buildx/radiusd:
|
2022-06-20 12:16:55 +02:00
|
|
|
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) \
|
|
|
|
--pull --push --platform $(IMAGE_ARCH) \
|
2023-03-02 03:47:23 +01:00
|
|
|
-f rlm_python/Dockerfile \
|
2023-02-17 08:02:01 +01:00
|
|
|
--progress $(BUILDKIT_PROGRESS) \
|
2023-08-14 02:06:53 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
2023-05-25 05:42:18 +02:00
|
|
|
-t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) \
|
|
|
|
-t $(IMAGE_BASE)/radius:$(IMAGE_EXT_VERSION) .
|
2020-08-17 09:16:33 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: buildx
|
2023-03-02 03:47:23 +01:00
|
|
|
buildx: buildx/kanidmd buildx/kanidm_tools buildx/radiusd
|
2020-08-17 09:16:33 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: build/kanidmd
|
2022-06-20 12:16:55 +02:00
|
|
|
build/kanidmd: ## Build the kanidmd docker image locally
|
2020-05-02 12:33:52 +02:00
|
|
|
build/kanidmd:
|
2023-05-25 05:42:18 +02:00
|
|
|
@$(CONTAINER_TOOL) build $(CONTAINER_TOOL_ARGS) -f server/Dockerfile \
|
|
|
|
-t $(IMAGE_BASE)/server:$(IMAGE_VERSION) \
|
2022-06-05 07:30:47 +02:00
|
|
|
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
2021-03-26 02:22:00 +01:00
|
|
|
--build-arg "KANIDM_FEATURES=" \
|
2023-08-14 02:06:53 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
2022-05-24 07:25:04 +02:00
|
|
|
$(CONTAINER_BUILD_ARGS) .
|
2020-05-02 12:33:52 +02:00
|
|
|
|
2024-07-04 02:38:10 +02:00
|
|
|
.PHONY: build/orca
|
|
|
|
build/orca: ## Build the orca docker image locally
|
|
|
|
build/orca:
|
|
|
|
@$(CONTAINER_TOOL) build $(CONTAINER_TOOL_ARGS) -f tools/orca/Dockerfile \
|
|
|
|
-t $(IMAGE_BASE)/orca:$(IMAGE_VERSION) \
|
|
|
|
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
2024-07-15 10:06:15 +02:00
|
|
|
--build-arg "KANIDM_FEATURES=$(KANIDM_FEATURES)" \
|
2024-07-04 02:38:10 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
|
|
|
$(CONTAINER_BUILD_ARGS) .
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: build/radiusd
|
2022-06-20 12:16:55 +02:00
|
|
|
build/radiusd: ## Build the radiusd docker image locally
|
2020-05-02 12:33:52 +02:00
|
|
|
build/radiusd:
|
2022-06-20 12:16:55 +02:00
|
|
|
@$(CONTAINER_TOOL) build $(CONTAINER_TOOL_ARGS) \
|
2023-03-02 03:47:23 +01:00
|
|
|
-f rlm_python/Dockerfile \
|
2023-08-14 02:06:53 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
2022-06-20 12:16:55 +02:00
|
|
|
-t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) .
|
2020-05-02 12:33:52 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: build
|
2020-06-30 06:21:59 +02:00
|
|
|
build: build/kanidmd build/radiusd
|
2020-05-02 12:33:52 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: test/kanidmd
|
2022-06-20 12:16:55 +02:00
|
|
|
test/kanidmd: ## Run cargo test in docker
|
2020-06-30 06:21:59 +02:00
|
|
|
test/kanidmd:
|
2022-05-23 08:37:41 +02:00
|
|
|
@$(CONTAINER_TOOL) build \
|
2023-03-02 03:47:23 +01:00
|
|
|
$(CONTAINER_TOOL_ARGS) -f server/Dockerfile \
|
2020-06-30 06:21:59 +02:00
|
|
|
--target builder \
|
|
|
|
-t $(IMAGE_BASE)/server:$(IMAGE_VERSION)-builder \
|
2023-08-14 02:06:53 +02:00
|
|
|
--label "com.kanidm.git-commit=$(GIT_COMMIT)" \
|
|
|
|
--label "com.kanidm.version=$(IMAGE_EXT_VERSION)" \
|
2022-05-24 07:25:04 +02:00
|
|
|
$(CONTAINER_BUILD_ARGS) .
|
2022-05-23 08:37:41 +02:00
|
|
|
@$(CONTAINER_TOOL) run --rm $(IMAGE_BASE)/server:$(IMAGE_VERSION)-builder cargo test
|
2020-06-30 06:21:59 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: test/radiusd
|
2022-06-20 12:16:55 +02:00
|
|
|
test/radiusd: ## Run a test radius server
|
2022-07-22 05:04:36 +02:00
|
|
|
test/radiusd: build/radiusd
|
2023-03-02 03:47:23 +01:00
|
|
|
cd rlm_python && \
|
2022-06-20 12:16:55 +02:00
|
|
|
./run_radius_container.sh
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: test
|
2022-07-20 09:21:40 +02:00
|
|
|
test:
|
|
|
|
cargo test
|
2020-06-30 06:21:59 +02:00
|
|
|
|
2023-01-24 00:38:19 +01:00
|
|
|
.PHONY: precommit
|
|
|
|
precommit: ## all the usual test things
|
|
|
|
precommit: test codespell test/pykanidm doc/format
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: vendor
|
2023-12-18 00:10:13 +01:00
|
|
|
vendor: ## Vendor required crates
|
2021-03-26 02:22:00 +01:00
|
|
|
vendor:
|
2023-02-06 00:50:10 +01:00
|
|
|
cargo vendor > cargo_vendor_config
|
2021-03-26 02:22:00 +01:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: vendor-prep
|
2021-03-26 02:22:00 +01:00
|
|
|
vendor-prep: vendor
|
2021-04-14 01:56:40 +02:00
|
|
|
tar -cJf vendor.tar.xz vendor
|
2019-11-30 09:43:01 +01:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: install-tools
|
2023-01-23 10:56:49 +01:00
|
|
|
install-tools: ## install kanidm_tools in your local environment
|
2020-05-02 12:33:52 +02:00
|
|
|
install-tools:
|
2023-03-02 03:47:23 +01:00
|
|
|
cargo install --path tools/cli --force
|
2020-04-11 02:32:56 +02:00
|
|
|
|
2023-01-10 04:50:53 +01:00
|
|
|
.PHONY: codespell
|
2023-05-11 00:30:13 +02:00
|
|
|
codespell: ## spell-check things.
|
2023-01-10 04:50:53 +01:00
|
|
|
codespell:
|
|
|
|
codespell -c \
|
2023-12-03 07:34:02 +01:00
|
|
|
-D .codespell_dictionary \
|
2023-10-27 08:03:58 +02:00
|
|
|
--ignore-words .codespell_ignore \
|
2023-03-13 01:41:16 +01:00
|
|
|
--skip='./target,./pykanidm/.venv,./pykanidm/.mypy_cache,./.mypy_cache,./pykanidm/poetry.lock' \
|
2023-10-24 06:00:37 +02:00
|
|
|
--skip='./book/*.js' \
|
2023-03-07 02:50:45 +01:00
|
|
|
--skip='./book/book/*' \
|
2023-07-07 10:53:31 +02:00
|
|
|
--skip='./book/src/images/*' \
|
2023-01-10 04:50:53 +01:00
|
|
|
--skip='./docs/*,./.git' \
|
2023-08-23 14:40:25 +02:00
|
|
|
--skip='*.svg' \
|
2023-11-09 06:15:12 +01:00
|
|
|
--skip='*.br' \
|
2023-03-13 01:41:16 +01:00
|
|
|
--skip='./rlm_python/mods-available/eap' \
|
2024-11-30 06:40:05 +01:00
|
|
|
--skip='./server/lib/src/constants/system_config.rs'
|
|
|
|
--skip='./pykanidm/site' \
|
|
|
|
--skip='./server/lib/src/constants/*.json'
|
2023-01-10 04:50:53 +01:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: test/pykanidm/pytest
|
2023-01-23 10:56:49 +01:00
|
|
|
test/pykanidm/pytest: ## python library testing
|
2022-06-20 12:16:55 +02:00
|
|
|
cd pykanidm && \
|
|
|
|
poetry install && \
|
|
|
|
poetry run pytest -vv
|
|
|
|
|
2023-01-23 10:56:49 +01:00
|
|
|
.PHONY: test/pykanidm/lint
|
|
|
|
test/pykanidm/lint: ## python library linting
|
2022-06-20 12:16:55 +02:00
|
|
|
cd pykanidm && \
|
|
|
|
poetry install && \
|
2024-09-10 02:36:50 +02:00
|
|
|
poetry run ruff check tests kanidm
|
2022-06-20 12:16:55 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: test/pykanidm/mypy
|
2023-01-23 10:56:49 +01:00
|
|
|
test/pykanidm/mypy: ## python library type checking
|
2022-06-20 12:16:55 +02:00
|
|
|
cd pykanidm && \
|
|
|
|
poetry install && \
|
|
|
|
echo "Running mypy" && \
|
|
|
|
poetry run mypy --strict tests kanidm
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: test/pykanidm
|
2023-01-23 10:56:49 +01:00
|
|
|
test/pykanidm: ## run the kanidm python module test suite (mypy/lint/pytest)
|
|
|
|
test/pykanidm: test/pykanidm/pytest test/pykanidm/mypy test/pykanidm/lint
|
2022-06-20 12:16:55 +02:00
|
|
|
|
2022-07-20 09:21:40 +02:00
|
|
|
########################################################################
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: doc
|
2022-07-20 09:21:40 +02:00
|
|
|
doc: ## Build the rust documentation locally
|
|
|
|
doc:
|
|
|
|
cargo doc --document-private-items
|
|
|
|
|
2022-12-26 23:52:03 +01:00
|
|
|
.PHONY: doc/format
|
|
|
|
doc/format: ## Format docs and the Kanidm book
|
2023-10-24 06:00:37 +02:00
|
|
|
find . -type f \
|
|
|
|
-not -path './target/*' \
|
|
|
|
-not -path './docs/*' \
|
|
|
|
-not -path '*/.venv/*' -not -path './vendor/*'\
|
2024-02-27 06:40:00 +01:00
|
|
|
-not -path '*/.*/*' \
|
2023-01-24 00:38:19 +01:00
|
|
|
-name \*.md \
|
|
|
|
-exec deno fmt --check $(MARKDOWN_FORMAT_ARGS) "{}" +
|
|
|
|
|
|
|
|
.PHONY: doc/format/fix
|
|
|
|
doc/format/fix: ## Fix docs and the Kanidm book
|
2023-10-13 00:50:36 +02:00
|
|
|
find . -type f -not -path './target/*' -not -path '*/.venv/*' -not -path './vendor/*'\
|
2023-01-24 00:38:19 +01:00
|
|
|
-name \*.md \
|
|
|
|
-exec deno fmt $(MARKDOWN_FORMAT_ARGS) "{}" +
|
2022-12-26 23:52:03 +01:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: book
|
2022-08-08 01:55:03 +02:00
|
|
|
book: ## Build the Kanidm book
|
2022-07-20 09:21:40 +02:00
|
|
|
book:
|
2023-10-24 06:00:37 +02:00
|
|
|
echo "Building rust docs"
|
|
|
|
cargo doc --no-deps --quiet
|
2023-03-02 03:47:23 +01:00
|
|
|
mdbook build book
|
2022-12-29 04:02:51 +01:00
|
|
|
rm -rf ./docs/
|
2023-03-02 03:47:23 +01:00
|
|
|
mv ./book/book/ ./docs/
|
2023-10-24 06:00:37 +02:00
|
|
|
mkdir -p $(PWD)/docs/rustdoc/${BOOK_VERSION}/
|
|
|
|
rsync -a --delete $(PWD)/target/doc/ $(PWD)/docs/rustdoc/${BOOK_VERSION}/
|
2022-07-20 09:21:40 +02:00
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: book_versioned
|
2022-07-20 09:21:40 +02:00
|
|
|
book_versioned:
|
|
|
|
echo "Book version: ${BOOK_VERSION}"
|
|
|
|
rm -rf ./target/doc
|
|
|
|
git switch -c "${BOOK_VERSION}"
|
|
|
|
git pull origin "${BOOK_VERSION}"
|
|
|
|
cargo doc --no-deps --quiet
|
2023-03-02 03:47:23 +01:00
|
|
|
mdbook build book
|
2022-12-29 04:02:51 +01:00
|
|
|
rm -rf ./docs/
|
2022-07-20 09:21:40 +02:00
|
|
|
mkdir -p ./docs
|
2023-03-02 03:47:23 +01:00
|
|
|
mv ./book/book/ ./docs/${BOOK_VERSION}/
|
2022-07-20 09:21:40 +02:00
|
|
|
mkdir -p ./docs/${BOOK_VERSION}/rustdoc/
|
|
|
|
mv ./target/doc/* ./docs/${BOOK_VERSION}/rustdoc/
|
|
|
|
git switch master
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: clean_book
|
2022-07-20 09:21:40 +02:00
|
|
|
clean_book:
|
|
|
|
rm -rf ./docs
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: docs/pykanidm/build
|
2022-06-20 12:16:55 +02:00
|
|
|
docs/pykanidm/build: ## Build the mkdocs
|
|
|
|
docs/pykanidm/build:
|
|
|
|
cd pykanidm && \
|
|
|
|
poetry install && \
|
|
|
|
poetry run mkdocs build
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: docs/pykanidm/serve
|
2022-06-20 12:16:55 +02:00
|
|
|
docs/pykanidm/serve: ## Run the local mkdocs server
|
|
|
|
docs/pykanidm/serve:
|
|
|
|
cd pykanidm && \
|
|
|
|
poetry install && \
|
2022-07-11 08:33:18 +02:00
|
|
|
poetry run mkdocs serve
|
2022-07-20 09:21:40 +02:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
2023-02-17 08:02:01 +01:00
|
|
|
.PHONY: release/prep
|
|
|
|
prep:
|
|
|
|
cargo outdated -R
|
|
|
|
cargo audit
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: release/kanidm
|
2022-07-20 09:21:40 +02:00
|
|
|
release/kanidm: ## Build the Kanidm CLI - ensure you include the environment variable KANIDM_BUILD_PROFILE
|
|
|
|
cargo build -p kanidm_tools --bin kanidm --release
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: release/kanidmd
|
2022-07-20 09:21:40 +02:00
|
|
|
release/kanidmd: ## Build the Kanidm daemon - ensure you include the environment variable KANIDM_BUILD_PROFILE
|
|
|
|
cargo build -p daemon --bin kanidmd --release
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: release/kanidm-ssh
|
2022-07-20 09:21:40 +02:00
|
|
|
release/kanidm-ssh: ## Build the Kanidm SSH tools - ensure you include the environment variable KANIDM_BUILD_PROFILE
|
|
|
|
cargo build --release \
|
|
|
|
--bin kanidm_ssh_authorizedkeys \
|
|
|
|
--bin kanidm_ssh_authorizedkeys_direct
|
|
|
|
|
2022-12-24 06:09:51 +01:00
|
|
|
.PHONY: release/kanidm-unixd
|
2022-07-20 09:21:40 +02:00
|
|
|
release/kanidm-unixd: ## Build the Kanidm UNIX tools - ensure you include the environment variable KANIDM_BUILD_PROFILE
|
|
|
|
release/kanidm-unixd:
|
|
|
|
cargo build -p pam_kanidm --release
|
|
|
|
cargo build -p nss_kanidm --release
|
2023-04-25 14:36:17 +02:00
|
|
|
cargo build --features unix -p kanidm_unix_int --release \
|
|
|
|
--bin kanidm_unixd \
|
2022-07-20 09:21:40 +02:00
|
|
|
--bin kanidm_unixd_tasks \
|
2023-04-26 07:42:23 +02:00
|
|
|
--bin kanidm-unix
|
2023-01-25 00:43:24 +01:00
|
|
|
|
|
|
|
# cert things
|
|
|
|
|
|
|
|
.PHONY: cert/clean
|
|
|
|
cert/clean: ## clean out the insecure cert bits
|
|
|
|
cert/clean:
|
|
|
|
rm -f /tmp/kanidm/*.pem
|
|
|
|
rm -f /tmp/kanidm/*.cnf
|
|
|
|
rm -f /tmp/kanidm/*.csr
|
|
|
|
rm -f /tmp/kanidm/ca.txt*
|
|
|
|
rm -f /tmp/kanidm/ca.{cnf,srl,srl.old}
|
2023-02-28 02:39:39 +01:00
|
|
|
|
2023-07-05 14:26:39 +02:00
|
|
|
|
|
|
|
.PHONY: coverage
|
2024-12-21 06:17:12 +01:00
|
|
|
coverage: ## Run the coverage tests using cargo-tarpaulin
|
|
|
|
cargo tarpaulin --out Html
|
|
|
|
@echo "Coverage file at file://$(PWD)/tarpaulin-report.html"
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: coveralls
|
|
|
|
coveralls: ## Run cargo tarpaulin and upload to coveralls
|
|
|
|
coveralls:
|
|
|
|
cargo tarpaulin --coveralls $(COVERALLS_REPO_TOKEN)
|
|
|
|
@echo "Coveralls repo information is at https://coveralls.io/github/kanidm/kanidm"
|