Skip to content

Commit a7c35bf

Browse files
Fix symbolic links from Carthage (#376)
* add remove symbolic links step * ship not shipped
1 parent 70379d5 commit a7c35bf

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
"fix:eslint": "eslint . --format stylish --fix",
7272
"preversion:changelog": "grep -q -F \"## v$npm_package_version\" CHANGELOG.md",
7373
"version:all": "yarn run preversion:changelog && yarn run version:bump && yarn run test",
74-
"version:bump": "node ./scripts/versionbump.js && git add -A"
74+
"version:bump": "node ./scripts/versionbump.js && git add -A",
75+
"prepack": "scripts/resolve-symlinks.sh"
7576
},
7677
"jest": {
7778
"testEnvironment": "jsdom",

scripts/resolve-symlinks.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
BUILD_DIR="src/ios/Carthage/Build"
6+
7+
if [ ! -d "$BUILD_DIR" ]; then
8+
echo "⚠️ Build directory not found: $BUILD_DIR"
9+
exit 1
10+
fi
11+
12+
echo "🔧 Resolving symlinks in $BUILD_DIR..."
13+
14+
TMP_DIR=$(mktemp -d)
15+
16+
cp -R -L "$BUILD_DIR" "$TMP_DIR"
17+
rm -rf "$BUILD_DIR"
18+
mv "$TMP_DIR/Build" "$BUILD_DIR"
19+
rmdir "$TMP_DIR"
20+
21+
echo "✅ Symlinks resolved successfully in $BUILD_DIR"

0 commit comments

Comments
 (0)