kanidm/Makefile
Pando85 2670b6ae83 CI update all kanidm component version and tag
Add make entry to have all cargo versions updated from VERSION file.
Add `tag_version` github action to update all cargo.toml and tag it and
push it.
Remove cargo fmt check from CI because we have problems with different
versions and fails continually. Instead, we use cargo-husky to ensure
that all people run it automatically in its local, but this is not
obligatory.
Update to version 1.0.0-rc10, according to packages published.

In future cargo will support managing all dependencies from main
Cargo.toml. Ref: https://github.com/rust-lang/cargo/issues/3931

Resolve #225
2020-05-13 15:56:44 +10:00

57 lines
1.6 KiB
Makefile

.PHONY: help build/kanidmd build/radiusd test/kanidmd push/kanidmd push/radiusd vendor-prep doc install-tools prep
IMAGE_BASE ?= kanidm
IMAGE_VERSION ?= latest
.DEFAULT: help
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/\n\t/'
build/kanidmd: ## build kanidmd images
build/kanidmd:
@docker build -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) .
build/radiusd: ## build radiusd image
build/radiusd:
@docker build -f kanidm_rlm_python/Dockerfile -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) \
kanidm_rlm_python
test/kanidmd: ## test kanidmd
test/kanidmd:
@docker build -f kanidmd/Dockerfile \
--target builder \
-t $(IMAGE_BASE)/server:$(IMAGE_VERSION)-builder \
.
@docker run --rm $(IMAGE_BASE)/server:$(IMAGE_VERSION)-builder cargo test
test/radiusd: build/radiusd ## test radiusd
push/kanidmd: ## push kanidmd images
push/kanidmd:
@docker push $(IMAGE_BASE)/server:$(IMAGE_VERSION)
push/radiusd: ## push radiusd image
push/radiusd:
@docker push $(IMAGE_BASE)/radius:$(IMAGE_VERSION)
vendor-prep:
cargo vendor
tar -czf vendor.tar.gz vendor
doc: ## build doc local
doc:
cargo doc --document-private-items
install-tools: ## install tools in local environment
install-tools:
cd kanidm_tools && cargo install --path . --force
prep:
cargo outdated -R
cargo audit
update-version: ## update version form VERSION file in all Cargo.toml manifests
update-version: */Cargo.toml
@VERSION=`cat VERSION`; sed -i "0,/^version\ \= .*$$/{s//version = \"$$VERSION\"/}" */Cargo.toml
@echo updated to version "`cat VERSION`" cargo files