From e5960ea282c543cf567b89b2f54b2e80a41e0a38 Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Mon, 31 Aug 2026 16:34:08 +0100 Subject: [PATCH] Let cargo publish carry the copied OWID source The first publish of fodid 4.5.3 stopped with cargo refusing thirteen files under fodid/src/owid that were not committed to git. They never will be, because ci/copy-owid-source.ps1 copies them from the owid-rust submodule before every build and git ignores the copy on purpose, so the publish call now passes --allow-dirty. The workflow starts from a clean checkout, so that copy is the only thing the flag lets through, and a publish dry run of fodid packages and verifies with it. --- ci/publish-crates.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/publish-crates.sh b/ci/publish-crates.sh index 2a4ab2d..6814888 100644 --- a/ci/publish-crates.sh +++ b/ci/publish-crates.sh @@ -72,7 +72,12 @@ crate_version() { publish_crate() { local crate="$1" attempt out when target now wait for attempt in $(seq 1 40); do - if out="$(cargo publish -p "$crate" 2>&1)"; then + # --allow-dirty because the OWID source under fodid/src/owid is copied + # in by ci/copy-owid-source.ps1 and deliberately never committed, and + # cargo otherwise refuses to publish a package that includes files git + # does not track. The workflow starts from a clean checkout, so that + # copy is the only thing the flag lets through. + if out="$(cargo publish -p "$crate" --allow-dirty 2>&1)"; then echo "$out" return 0 fi