Skip to content

Commit 5342fca

Browse files
committed
fix: strip [patch.crates-io] in Python and Node publish workflows
The haiipy and haiinpm native builds failed because the workspace Cargo.toml references ../../JACS/jacs via [patch.crates-io], which does not exist in the publish environment. Add the same patch-stripping step already used in publish-rust.yml.
1 parent ab5bc2b commit 5342fca

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/publish-node.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ jobs:
144144
- uses: dtolnay/rust-toolchain@stable
145145
with:
146146
targets: ${{ matrix.target }}
147+
- name: Remove local dev patches
148+
run: node -e "const f='rust/Cargo.toml';let t=require('fs').readFileSync(f,'utf8').replace(/\r\n/g,'\n');t=t.replace(/\n*(#[^\n]*\n)*\[patch[\s\S]*$/,'\n');require('fs').writeFileSync(f,t)"
147149
- name: Build haiinpm native addon
148150
run: |
149151
cd rust/haiinpm

.github/workflows/publish-python.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
targets: ${{ matrix.maturin_target }}
6262
- name: Install maturin
6363
run: pip install maturin
64+
- name: Remove local dev patches
65+
run: node -e "const f='rust/Cargo.toml';let t=require('fs').readFileSync(f,'utf8').replace(/\r\n/g,'\n');t=t.replace(/\n*(#[^\n]*\n)*\[patch[\s\S]*$/,'\n');require('fs').writeFileSync(f,t)"
6466
- name: Build haiipy wheel
6567
run: |
6668
cd rust/haiipy

0 commit comments

Comments
 (0)