-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚙️ Chore: Update Build-Relayed Scripts
- Loading branch information
1 parent
75b8672
commit fe3ce6e
Showing
4 changed files
with
142 additions
and
119 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,25 @@ | ||
#!/bin/bash | ||
|
||
BUILD_CONFIG="${1:-DEBUG}" | ||
|
||
cd ./example/ios | ||
|
||
BUILD_INFO=$( | ||
xcodebuild \ | ||
-project ./*.xcodeproj \ | ||
-showBuildSettings -list -json | tr -d ' ' | tr -d '\n' | ||
) | ||
|
||
SCHEME_NAME=$( | ||
node -pe 'JSON.parse(process.argv[1]).project.schemes[0]' $BUILD_INFO | ||
) | ||
echo "Starting build..." | ||
echo "Configuration: $BUILD_CONFIG" | ||
echo "Scheme: $SCHEME_NAME" | ||
|
||
xcodebuild \ | ||
-workspace *.xcworkspace \ | ||
-configuration Release \ | ||
-scheme $SCHEME_NAME \ | ||
-destination 'generic/platform=iOS' \ | ||
clean build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,139 @@ | ||
#!/bin/bash | ||
|
||
NEW_ARCH_STATIC=PENDING | ||
OLD_ARCH_STATIC=PENDING | ||
NEW_ARCH_DYNAMIC=PENDING | ||
# value: either "quick" or "not-quick" | ||
# default: "not-quick" | ||
BUILD_MODE="${1:-not-quick}" | ||
|
||
NEW_ARCH_STATIC_DEBUG=PENDING | ||
OLD_ARCH_STATIC_DEBUG=PENDING | ||
NEW_ARCH_STATIC_RELEASE=PENDING | ||
OLD_ARCH_STATIC_RELEASE=PENDING | ||
# NEW_ARCH_DYNAMIC=PENDING | ||
OLD_ARCH_DYNAMIC=PENDING | ||
|
||
log_build_status() { | ||
echo "\n\n\nBUILD RESULTS..."; | ||
echo "Build - NEW_ARCH_STATIC: ${NEW_ARCH_STATIC}" | ||
echo "Build - OLD_ARCH_STATIC: ${OLD_ARCH_STATIC}" | ||
echo "Build - NEW_ARCH_DYNAMIC: ${NEW_ARCH_DYNAMIC}" | ||
echo "\n\n\nBUILD RESULTS..." | ||
echo "BUILD_MODE: $BUILD_MODE" | ||
echo "Build - NEW_ARCH_STATIC_DEBUG: ${NEW_ARCH_STATIC_DEBUG}" | ||
echo "Build - OLD_ARCH_STATIC_DEBUG: ${OLD_ARCH_STATIC_DEBUG}" | ||
echo "Build - NEW_ARCH_STATIC_RELEASE: ${NEW_ARCH_STATIC_RELEASE}" | ||
echo "Build - OLD_ARCH_STATIC_RELEASE: ${OLD_ARCH_STATIC_RELEASE}" | ||
# echo "Build - NEW_ARCH_DYNAMIC: ${NEW_ARCH_DYNAMIC}" | ||
echo "Build - OLD_ARCH_DYNAMIC: ${OLD_ARCH_DYNAMIC}" | ||
echo "\n\n" | ||
} | ||
|
||
clear_cache(){ | ||
echo '\nclearing pods + derived data...' | ||
yarn run nuke:example-pods | ||
yarn run nuke:derived-data | ||
echo "\nBUILD_MODE: $BUILD_MODE" | ||
|
||
# Check the value of BUILD_MODE | ||
if [ "$BUILD_MODE" = "quick" ]; then | ||
echo "Skipping cleanup..." | ||
|
||
elif [ "$BUILD_MODE" = "not-quick" ]; then | ||
echo 'clearing pods + derived data...' | ||
yarn run nuke:example-pods | ||
yarn run nuke:derived-data | ||
else | ||
echo "Invalid BUILD_MODE. Please use 'quick' or 'not-quick'." | ||
fi | ||
} | ||
|
||
log_build_status; | ||
clear_cache; | ||
build_A1(){ | ||
log_build_status | ||
clear_cache; | ||
|
||
echo '\n\nBuild - new-arch (fabric) + static: Begin...\n' | ||
yarn run pod-install:new-static | ||
yarn run build:ios ; | ||
echo '\n\nBuild - new-arch (fabric) + static, debug: Begin...\n' | ||
yarn run pod-install:new-static | ||
yarn run build:ios ; | ||
|
||
if [ $? -eq 0 ]; then | ||
NEW_ARCH_STATIC=SUCCESS; | ||
else | ||
NEW_ARCH_STATIC=FAILED; | ||
fi; | ||
if [ $? -eq 0 ]; then | ||
NEW_ARCH_STATIC_DEBUG=SUCCESS; | ||
else | ||
NEW_ARCH_STATIC_DEBUG=FAILED; | ||
fi | ||
} | ||
|
||
build_A2(){ | ||
log_build_status | ||
clear_cache | ||
|
||
log_build_status | ||
clear_cache | ||
echo '\n\nBuild - old-arch (paper) + static, debug: Begin...' | ||
yarn run pod-install:old-static | ||
yarn run build:ios ; | ||
|
||
echo '\n\nBuild - old-arch (paper) + static: Begin...' | ||
yarn run pod-install:old-static | ||
yarn run build:ios ; | ||
if [ $? -eq 0 ]; then | ||
OLD_ARCH_STATIC_DEBUG=SUCCESS; | ||
else | ||
OLD_ARCH_STATIC_DEBUG=FAILED; | ||
fi | ||
} | ||
|
||
if [ $? -eq 0 ]; then | ||
OLD_ARCH_STATIC=SUCCESS; | ||
else | ||
OLD_ARCH_STATIC=FAILED; | ||
fi; | ||
build_B1(){ | ||
log_build_status | ||
clear_cache | ||
|
||
log_build_status | ||
clear_cache | ||
echo '\n\nBuild - new-arch (fabric) + static, release: Begin...' | ||
yarn run pod-install:new-static | ||
yarn run build:ios-release ; | ||
|
||
echo '\nBuild - new-arch (fabric) + dynamic: Begin...\n' | ||
yarn run pod-install:new-dynamic | ||
yarn run build:ios ; | ||
if [ $? -eq 0 ]; then | ||
NEW_ARCH_STATIC_RELEASE=SUCCESS; | ||
else | ||
NEW_ARCH_STATIC_RELEASE=FAILED; | ||
fi | ||
} | ||
|
||
if [ $? -eq 0 ]; then | ||
NEW_ARCH_DYNAMIC=SUCCESS; | ||
else | ||
NEW_ARCH_DYNAMIC=FAILED; | ||
fi; | ||
build_B2(){ | ||
log_build_status | ||
clear_cache | ||
|
||
log_build_status; | ||
clear_cache; | ||
echo '\n\nBuild - old-arch (paper) + static, release: Begin...' | ||
yarn run pod-install:old-static | ||
yarn run build:ios-release ; | ||
|
||
echo 'Build - old-arch (paper) + static: Begin...' | ||
yarn run pod-install:old-dynamic | ||
yarn run build:ios ; | ||
if [ $? -eq 0 ]; then | ||
OLD_ARCH_STATIC_RELEASE=SUCCESS; | ||
else | ||
OLD_ARCH_STATIC_RELEASE=FAILED; | ||
fi | ||
} | ||
|
||
# build_C1(){ | ||
# log_build_status | ||
# clear_cache | ||
|
||
# echo '\nBuild - new-arch (fabric) + dynamic: Begin...\n' | ||
# yarn run pod-install:new-dynamic | ||
# yarn run build:ios ; | ||
|
||
# if [ $? -eq 0 ]; then | ||
# NEW_ARCH_DYNAMIC=SUCCESS; | ||
# else | ||
# NEW_ARCH_DYNAMIC=FAILED; | ||
# fi | ||
# } | ||
|
||
build_C2(){ | ||
log_build_status; | ||
clear_cache; | ||
|
||
echo 'Build - old-arch (paper) + static: Begin...' | ||
yarn run pod-install:old-dynamic | ||
yarn run build:ios ; | ||
|
||
if [ $? -eq 0 ]; then | ||
OLD_ARCH_DYNAMIC=SUCCESS; | ||
else | ||
OLD_ARCH_DYNAMIC=FAILED; | ||
fi | ||
} | ||
|
||
if [ $? -eq 0 ]; then | ||
OLD_ARCH_DYNAMIC=SUCCESS; | ||
else | ||
OLD_ARCH_DYNAMIC=FAILED; | ||
fi; | ||
build_A1 | ||
build_A2 | ||
build_B1 | ||
build_B2 | ||
build_C2 | ||
|
||
echo "\n\n All Builds Completed..." | ||
log_build_status; | ||
log_build_status |