# Shortcut for common operations:
-CRATES=proxmox proxmox-api proxmox-api-macro proxmox-sortable-macro proxmox-sys proxmox-tools
+CRATES = \
+ proxmox-api-macro \
+ proxmox-async \
+ proxmox-borrow \
+ proxmox-compression \
+ proxmox-http \
+ proxmox-io \
+ proxmox-lang \
+ proxmox-router \
+ proxmox-schema \
+ proxmox-serde \
+ proxmox-shared-memory \
+ proxmox-section-config \
+ proxmox-sortable-macro \
+ proxmox-sys \
+ proxmox-tfa \
+ proxmox-time \
+ proxmox-uuid
# By default we just run checks:
.PHONY: all
echo $(foreach c,$(CRATES), $c-deb)
lintian build/*.deb
+.PHONY: autopkgtest
+autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest)
+
.PHONY: dinstall
dinstall:
- $(MAKE) proxmox-tools-deb proxmox-sortable-macro-deb
- sudo dpkg -i build/librust-*.deb
- $(MAKE) proxmox-api-macro-deb proxmox-sys-deb
- sudo dpkg -i build/librust-*.deb
- $(MAKE) proxmox-deb
- sudo dpkg -i build/librust-*.deb
- sudo -k
+ $(MAKE) clean
+ $(MAKE) deb
+ sudo -k dpkg -i build/librust-*.deb
%-deb:
./build.sh $*
touch $@
+%-autopkgtest:
+ autopkgtest build/$* build/*.deb -- null
+ touch $@
+
.PHONY: check
check:
- cargo +nightly fmt -- --check
cargo test
# Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
# Prints a diff between the current code and the one rustfmt would produce
.PHONY: fmt
-checkfmt:
- cargo fmt --all -- --check
-
-# Reformat the code (ppply the output of `make checkfmt`)
-.PHONY: fmt
fmt:
- cargo fmt --all
+ cargo +nightly fmt -- --check
# Doc without dependencies
.PHONY: doc
.PHONY: clean
clean:
cargo clean
- rm -rf build *-deb
+ rm -rf build *-deb *-autopkgtest
.PHONY: update
update:
cargo update
+
+%-upload: %-deb
+ cd build; \
+ dcmd --deb rust-$*_*.changes \
+ | grep -v '.changes$$' \
+ | tar -cf "$@.tar" -T-; \
+ cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye