-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DTA iOS compilation, and consume native from xcframework (backport …
…#4151) (#4163) Co-authored-by: Arun George <[email protected]> Co-authored-by: Paul Connelly <[email protected]> Co-authored-by: Arun George <[email protected]> Co-authored-by: Mark Schlosser <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Seamus Kirby <[email protected]>
- Loading branch information
1 parent
4ad58a3
commit a3eeba4
Showing
11 changed files
with
142 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/bin/bash | ||
|
||
usage() { | ||
echo "Updates the itwinjs-core repository to use a new version of the @bentley/imodeljs-native package." | ||
echo "Usage: $0 -v VERSION" | ||
echo " -v VERSION: The semantic version (e.g., 3.2.7) of the @bentley/imodeljs-native package to which to update." | ||
} | ||
|
||
checkfail() { | ||
if [ $? -ne 0 ]; then | ||
>&2 echo "Error - aborting." | ||
exit 1 | ||
fi | ||
} | ||
|
||
while getopts "v:" options; do | ||
case "${options}" in | ||
v) AddonVersion=${OPTARG} ;; | ||
?) usage ; exit 1 ;; | ||
esac | ||
done | ||
|
||
if [ "$AddonVersion" = "" ]; then | ||
usage | ||
exit 1 | ||
fi | ||
|
||
# Find repo root and verify it's an itwinjs-core repo. | ||
RepoRoot=`git rev-parse --show-toplevel` | ||
if [[ $? -ne 0 || ! -f "$RepoRoot/core/backend/package.json" ]]; then | ||
>&2 echo "This script must be executed from within itwinjs-core repo." | ||
exit 1; | ||
fi | ||
|
||
updatePackageJson() { | ||
packageJson="$RepoRoot/$1/package.json" | ||
packageTmp="$RepoRoot/package.json.tmp" | ||
jq --arg version $AddonVersion '.dependencies."@bentley/imodeljs-native"=$version' "$packageJson" > "$packageTmp" | ||
checkfail | ||
mv "$packageTmp" "$packageJson" | ||
checkfail | ||
} | ||
|
||
echo "Updating @bentley/imodeljs-native to $AddonVersion..." | ||
|
||
# Update package.json files | ||
updatePackageJson "core/backend" | ||
updatePackageJson "full-stack-tests/backend" | ||
|
||
# Update XCode projects. This relies on the "version = " string occurring exactly once, specifying the imodeljs-native version. | ||
PbxProj1="$RepoRoot/tools/internal/ios/core-test-runner/core-test-runner.xcodeproj/project.pbxproj" | ||
PbxProj2="$RepoRoot/test-apps/display-test-app/ios/imodeljs-test-app/imodeljs-test-app.xcodeproj/project.pbxproj" | ||
|
||
for PbxProj in PbxProj1 PbxProj2 | ||
do | ||
sed -i "s/version = .*;/version = $AddonVersion;/" "$PbxProj" | ||
done | ||
|
||
# Purge node_modules | ||
rm "$RepoRoot/common/config/rush/browser-approved-packages.json" | ||
rm "$RepoRoot/common/config/rush/pnpm-lock.yaml" | ||
rm -rf "$RepoRoot/common/temp" | ||
|
||
# Update to new @bentley/imodeljs-native package. | ||
rush update | ||
checkfail | ||
|
||
git commit -am"@bentley/imodeljs-native $AddonVersion" | ||
checkfail | ||
|
||
# Generate empty change logs. | ||
yes "" | rush change | ||
checkfail | ||
|
||
git add "$RepoRoot/common/changes" | ||
git commit --amend --no-edit | ||
|
||
echo "Update complete." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package.resolved |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...modeljs-test-app/imodeljs-test-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
test-apps/display-test-app/ios/scripts/installIosNativeLib.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters