Skip to content

Commit eb0d57c

Browse files
committed
chore: simplify Rust target addition in CI workflow and enhance script for cross-platform compatibility
1 parent b455757 commit eb0d57c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@ jobs:
169169

170170
- name: Install iOS target for Rust
171171
if: env.turbo_cache_hit != 1
172-
run: rustup target add \
173-
aarch64-apple-ios \
174-
aarch64-apple-ios-sim
175-
172+
run: rustup target add aarch64-apple-ios aarch64-apple-ios-sim
176173

177174
- name: Build for iOS
178175
run: |

scripts/add-extension.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/bin/bash
22

3+
# Detect the operating system to use appropriate sed syntax
4+
if [[ "$OSTYPE" == "darwin"* ]]; then
5+
# macOS
6+
SED_INPLACE="sed -i ''"
7+
else
8+
# Linux (including CI environments)
9+
SED_INPLACE="sed -i"
10+
fi
11+
312
# Replace line 29 in src/index.tsx with export statement
4-
sed -i '' '29c\
13+
$SED_INPLACE '29c\
514
export * from '\''./extension'\'';
615
' src/index.tsx

0 commit comments

Comments
 (0)