From d3f2a86f800eb56ad9e6a1b6c83bdc39022920b8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 9 Dec 2022 13:16:02 +0100 Subject: [PATCH] buildsys: get crate list via cargo metadata in Makefile so we don't have to keep this in sync manually Signed-off-by: Wolfgang Bumiller --- Makefile | 22 +--------------------- README.rst | 8 ++++---- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 92410152..17f6a2ee 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,6 @@ # Shortcut for common operations: -CRATES = \ - proxmox-api-macro \ - proxmox-async \ - proxmox-borrow \ - proxmox-compression \ - proxmox-http \ - proxmox-io \ - proxmox-lang \ - proxmox-metrics \ - proxmox-rest-server \ - proxmox-router \ - proxmox-schema \ - proxmox-serde \ - proxmox-shared-memory \ - proxmox-section-config \ - proxmox-sortable-macro \ - proxmox-subscription \ - proxmox-sys \ - proxmox-tfa \ - proxmox-time \ - proxmox-uuid +CRATES != cargo metadata --format-version=1 | jq -r .workspace_members'[]' | awk '{ print $$1 }' # By default we just run checks: .PHONY: all diff --git a/README.rst b/README.rst index 46745225..59619a80 100644 --- a/README.rst +++ b/README.rst @@ -27,12 +27,12 @@ Adding Crates 1) At the top level: - Generate the crate: ``cargo new --lib the-name`` - Sort the crate into ``Cargo.toml``'s ``workspace.members`` - - Sort the crate into the ``Makefile``'s ``CRATES`` list. 2) In the new crate's ``Cargo.toml``: - - Replace the ``author`` line with - ``authors = ["Proxmox Support Team "]`` - - Add ``license = "AGPL-3"`` + - In ``[package]`` set: + authors.workspace = true + license.workspace = true + edition.workspace = true - Add ``exclude = [ "debian" ]`` - Add a meaningful ``description`` - Copy ``debian/copyright`` and ``debian/debcargo.toml`` from another subcrate.