bitwarden_rs_ldap/Makefile

93 lines
1.9 KiB
Makefile
Raw Normal View History

2021-05-07 19:55:29 +00:00
DOCKER_TAG ?= vaultwarden_ldap_${USER}
.PHONY: all
all: test check release
# Default make target will run tests
.DEFAULT_GOAL = test
# Build debug version
2021-05-07 19:55:29 +00:00
target/debug/vaultwarden_ldap: src/
cargo build
# Build release version
2021-05-07 19:55:29 +00:00
target/release/vaultwarden_ldap: src/
cargo build --locked --release
.PHONY: build
build: debug
.PHONY: debug
2021-05-07 19:55:29 +00:00
debug: target/debug/vaultwarden_ldap
.PHONY: release
2021-05-07 19:55:29 +00:00
release: target/release/vaultwarden_ldap
# Run debug version
.PHONY: run-debug
2021-05-07 19:55:29 +00:00
run-debug: target/debug/vaultwarden_ldap
target/debug/vaultwarden_ldap
# Run all tests
.PHONY: test
test:
cargo test
2021-07-23 22:28:19 +00:00
# Run bootstrapped integration test
.PHONY: itest
itest:
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest.yml \
build
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest.yml \
up -d vaultwarden ldap
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest.yml \
run ldap_sync
docker-compose stop
2021-07-23 22:28:19 +00:00
# Run bootstrapped integration test using env for config
.PHONY: itest-env
itest-env:
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest-env.yml \
build
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest-env.yml \
up -d vaultwarden ldap
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest-env.yml \
run ldap_sync
docker-compose stop
2021-07-23 22:28:19 +00:00
.PHONY: clean-itest
clean-itest:
docker-compose down -v
# Installs pre-commit hooks
.PHONY: install-hooks
install-hooks:
pre-commit install --install-hooks
# Checks files for encryption
.PHONY: check
check:
pre-commit run --all-files
# Checks that version matches the current tag
.PHONY: check-version
check-version:
./scripts/check-version.sh
.PHONY: clean
clean:
rm -f ./target
.PHONY: docker-build-all
2024-07-12 22:46:37 +00:00
docker-build-all: docker-build
.PHONY: docker-build
docker-build:
docker build -f ./Dockerfile -t $(DOCKER_TAG) .