Skip to content

Commit b22fc10

Browse files
committed
⚙️ Chore: Add Script test-builds
1 parent 6b3ff22 commit b22fc10

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
"update-dep:pods": "cd example/ios ; pod install --repo-update ; pod update DGSwiftUtilities ContextMenuAuxiliaryPreview ; cd ../.. ; yarn run build:update-version",
6868
"initialize": "yarn run initialize:js ; yarn run pod-install",
6969
"initialize:js": "yarn install ; cd example ; yarn install ; cd ..",
70-
"initialize:reset": "npm run nuke:all ; yarn ; npm run initialize"
70+
"initialize:reset": "npm run nuke:all ; yarn ; npm run initialize",
71+
"test-build:all": "sh ./scripts/test-builds.sh"
7172
},
7273
"keywords": [
7374
"react-native",

scripts/test-builds.sh

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/bin/bash
2+
3+
NEW_ARCH_STATIC=PENDING
4+
OLD_ARCH_STATIC=PENDING
5+
NEW_ARCH_DYNAMIC=PENDING
6+
OLD_ARCH_DYNAMIC=PENDING
7+
8+
log_build_status() {
9+
echo "\n\n\nBUILD RESULTS...";
10+
echo "Build - NEW_ARCH_STATIC: ${NEW_ARCH_STATIC}"
11+
echo "Build - OLD_ARCH_STATIC: ${OLD_ARCH_STATIC}"
12+
echo "Build - NEW_ARCH_DYNAMIC: ${NEW_ARCH_DYNAMIC}"
13+
echo "Build - OLD_ARCH_DYNAMIC: ${OLD_ARCH_DYNAMIC}"
14+
echo "\n\n"
15+
}
16+
17+
clear_cache(){
18+
echo '\nclearing pods + derived data...'
19+
yarn run nuke:example-pods
20+
yarn run nuke:derived-data
21+
}
22+
23+
log_build_status;
24+
clear_cache;
25+
26+
echo '\n\nBuild - new-arch (fabric) + static: Begin...\n'
27+
yarn run pod-install:new-static
28+
yarn run build:ios ;
29+
30+
if [ $? -eq 0 ]; then
31+
NEW_ARCH_STATIC=SUCCESS;
32+
else
33+
NEW_ARCH_STATIC=FAILED;
34+
fi;
35+
36+
log_build_status
37+
clear_cache
38+
39+
echo '\n\nBuild - old-arch (paper) + static: Begin...'
40+
yarn run pod-install:old-static
41+
yarn run build:ios ;
42+
43+
if [ $? -eq 0 ]; then
44+
OLD_ARCH_STATIC=SUCCESS;
45+
else
46+
OLD_ARCH_STATIC=FAILED;
47+
fi;
48+
49+
log_build_status
50+
clear_cache
51+
52+
echo '\nBuild - new-arch (fabric) + dynamic: Begin...\n'
53+
yarn run pod-install:new-dynamic
54+
yarn run build:ios ;
55+
56+
if [ $? -eq 0 ]; then
57+
NEW_ARCH_DYNAMIC=SUCCESS;
58+
else
59+
NEW_ARCH_DYNAMIC=FAILED;
60+
fi;
61+
62+
log_build_status;
63+
clear_cache;
64+
65+
echo 'Build - old-arch (paper) + static: Begin...'
66+
yarn run pod-install:old-dynamic
67+
yarn run build:ios ;
68+
69+
if [ $? -eq 0 ]; then
70+
OLD_ARCH_DYNAMIC=SUCCESS;
71+
else
72+
OLD_ARCH_DYNAMIC=FAILED;
73+
fi;
74+
75+
echo "\n\n All Builds Completed..."
76+
log_build_status;

0 commit comments

Comments
 (0)