forked from ViViDboarder/vaultwarden_ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (63 loc) · 1.56 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
DOCKER_TAG ?= vaultwarden_ldap_${USER}
.PHONY: all
all: test check release
# Default make target will run tests
.DEFAULT_GOAL = test
# Build debug version
target/debug/vaultwarden_ldap: src/
cargo build
# Build release version
target/release/vaultwarden_ldap: src/
cargo build --locked --release
.PHONY: build
build: debug
.PHONY: debug
debug: target/debug/vaultwarden_ldap
.PHONY: release
release: target/release/vaultwarden_ldap
# Run debug version
.PHONY: run-debug
run-debug: target/debug/vaultwarden_ldap
target/debug/vaultwarden_ldap
# Run all tests
.PHONY: test
test:
cargo test
# Run bootstrapped integration test
.PHONY: itest
itest:
docker-compose -f docker-compose.yml \
-f itest/docker-compose.itest.yml \
up --build
# 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 \
up --build
.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
docker-build-all: docker-build docker-build-alpine
.PHONY: docker-build
docker-build:
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
.PHONY: docker-build-alpine
docker-build-alpine:
docker build -f ./Dockerfile.alpine -t $(DOCKER_TAG):alpine .