Skip to content

Commit 18fa666

Browse files
committed
fix(ci): strip python feature from all workspace crates before publish
bashkit-js and bashkit-python also depend on bashkit with features=["python"]. Cargo resolves the whole workspace, so all crates must have the python feature stripped before publishing.
1 parent fee2378 commit 18fa666

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,30 @@ jobs:
4040
4141
- name: Strip git-only dependencies for publishing
4242
# monty is a git dep (not yet on crates.io) — remove before publish.
43-
# Must strip from both bashkit AND bashkit-cli because cargo resolves
44-
# the whole workspace when publishing a single crate.
43+
# Must strip from ALL workspace crates because cargo resolves the
44+
# whole workspace when publishing a single crate.
4545
run: |
46-
# --- bashkit core ---
46+
# --- bashkit core: remove monty dep and python feature ---
4747
TOML=crates/bashkit/Cargo.toml
4848
sed -i '/^monty = .*/d' "$TOML"
4949
sed -i '/^python = \["dep:monty"\]/d' "$TOML"
5050
sed -i '/^\[\[example\]\]/{N;N;/python_scripts/d}' "$TOML"
51-
echo "--- bashkit Cargo.toml after stripping ---"
52-
cat "$TOML"
5351
54-
# --- bashkit-cli (workspace resolution requires this too) ---
52+
# --- bashkit-cli: remove python feature ---
5553
CLI_TOML=crates/bashkit-cli/Cargo.toml
5654
sed -i '/^python = \["bashkit\/python"\]/d' "$CLI_TOML"
5755
sed -i 's/default = \["python"\]/default = []/' "$CLI_TOML"
58-
echo "--- bashkit-cli Cargo.toml after stripping ---"
59-
cat "$CLI_TOML"
56+
57+
# --- bashkit-js: remove python from features list ---
58+
JS_TOML=crates/bashkit-js/Cargo.toml
59+
sed -i 's/, "python"//; s/"python", //' "$JS_TOML"
60+
61+
# --- bashkit-python: remove python from features list ---
62+
PY_TOML=crates/bashkit-python/Cargo.toml
63+
sed -i 's/, "python"//; s/"python", //' "$PY_TOML"
64+
65+
echo "=== Verify no python feature references remain ==="
66+
grep -rn '"python"' crates/*/Cargo.toml || echo "Clean — no python feature refs"
6067
6168
- name: Publish bashkit to crates.io
6269
run: cargo publish -p bashkit --allow-dirty

0 commit comments

Comments
 (0)