]> git.proxmox.com Git - proxmox.git/blame - Makefile
bump proxmox-tfa to 4.0.0-1, auth-api to 0.1.1-1
[proxmox.git] / Makefile
CommitLineData
35a60f76
WB
1# Shortcut for common operations:
2
d3f2a86f 3CRATES != cargo metadata --format-version=1 | jq -r .workspace_members'[]' | awk '{ print $$1 }'
a94de245 4
35a60f76
WB
5# By default we just run checks:
6.PHONY: all
7all: check
8
a94de245
FG
9.PHONY: deb
10deb: $(foreach c,$(CRATES), $c-deb)
11 echo $(foreach c,$(CRATES), $c-deb)
12 lintian build/*.deb
13
8e62cf06
FG
14.PHONY: autopkgtest
15autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest)
16
93cf522d 17.PHONY: dinstall
3312a7ad
WB
18dinstall:
19 $(MAKE) clean
20 $(MAKE) deb
436bf05e 21 sudo -k dpkg -i build/librust-*.deb
93cf522d 22
a94de245
FG
23%-deb:
24 ./build.sh $*
25 touch $@
26
8e62cf06
FG
27%-autopkgtest:
28 autopkgtest build/$* build/*.deb -- null
29 touch $@
30
35a60f76
WB
31.PHONY: check
32check:
33 cargo test
34
80343b11
WB
35# Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
36# http:
37.PHONY: apitest
38apitest:
39 cargo run -p api-test -- api-test/www/
40
35a60f76
WB
41# Prints a diff between the current code and the one rustfmt would produce
42.PHONY: fmt
35a60f76 43fmt:
d84f563d 44 cargo +nightly fmt -- --check
35a60f76
WB
45
46# Doc without dependencies
47.PHONY: doc
48doc:
49 cargo doc --no-deps
50
51.PHONY: clean
52clean:
53 cargo clean
8e62cf06 54 rm -rf build *-deb *-autopkgtest
35a60f76
WB
55
56.PHONY: update
57update:
58 cargo update
0e9eb37e
FG
59
60%-upload: %-deb
61 cd build; \
62 dcmd --deb rust-$*_*.changes \
63 | grep -v '.changes$$' \
89d14b47 64 | tar -cf "$@.tar" -T-; \
89d14b47 65 cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye