Skip to content

Commit a42e6ca

Browse files
committed
revert appcenter changes
1 parent a4f2d7e commit a42e6ca

4 files changed

Lines changed: 116 additions & 0 deletions

File tree

.github/workflows/ios-build-custom-dev-app.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ jobs:
4242
run: pod install
4343
working-directory: ./ios
4444

45+
- name: appcenter prebuilt script test
46+
shell: bash
47+
working-directory: ./
48+
run: |
49+
chmod +x ./appcenter-pre-build.sh
50+
APPCENTER_XCODE_SCHEME="nativeTemplate" APPCENTER_SOURCE_DIRECTORY="./" IS_DEV_APP=False ./appcenter-pre-build.sh
51+
4552
- name: iOS Build Action
4653
uses: yukiarrr/ios-build-action@v1.12.0
4754
with:

appcenter-build-config.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"ios": {
3+
"trigger": "manual",
4+
"testEnabled": false,
5+
"signed": false,
6+
"environmentVariables": [
7+
{ "name": "CODE_PUSH_KEY", "value": "" },
8+
{ "name": "IS_DEV_APP", "value": false },
9+
{ "name": "SUPPORTS_MOBILE_TOOLKIT", "value": false }
10+
],
11+
"toolsets": {
12+
"xcode": {
13+
"xcodeVersion": "15.4",
14+
"automaticSigning": false,
15+
"projectOrWorkspacePath": "ios/NativeTemplate.xcworkspace",
16+
"podfilePath": "ios/Podfile",
17+
"scheme": "nativeTemplate"
18+
},
19+
"javascript": {
20+
"packageJsonPath": "package.json",
21+
"runTests": false,
22+
"nodeVersion": "18.x"
23+
},
24+
"buildscripts": {
25+
"package.json": {
26+
"postClone": "appcenter-post-clone.sh",
27+
"preBuild": "appcenter-pre-build.sh"
28+
}
29+
}
30+
}
31+
},
32+
"android": {
33+
"trigger": "manual",
34+
"testEnabled": false,
35+
"signed": false,
36+
"environmentVariables": [
37+
{ "name": "CODE_PUSH_KEY", "value": "" },
38+
{ "name": "IS_DEV_APP", "value": false },
39+
{ "name": "SUPPORTS_MOBILE_TOOLKIT", "value": false },
40+
{ "name": "JAVA_HOME", "value": "$(JAVA_HOME_17_X64)" }
41+
],
42+
"toolsets": {
43+
"android": {
44+
"module": "app",
45+
"buildVariant": "appstoreDebug",
46+
"isRoot": false,
47+
"runTests": false,
48+
"runLint": false,
49+
"automaticSigning": false,
50+
"gradleWrapperPath": "android/gradlew"
51+
},
52+
"javascript": {
53+
"packageJsonPath": "package.json",
54+
"runTests": false,
55+
"nodeVersion": "18.x"
56+
},
57+
"buildscripts": {
58+
"package.json": {
59+
"postClone": "appcenter-post-clone.sh",
60+
"preBuild": "appcenter-pre-build.sh"
61+
}
62+
}
63+
}
64+
}
65+
}

appcenter-post-clone.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# Untar bundle resources
5+
if [ -f "./android/res.tar.gz" ]; then
6+
tar xvzf "./android/res.tar.gz" -C "./android/app/src/main/res" && sudo find "./android/app/src/main/res/." -type d -exec chmod u+rwx {} \;
7+
fi
8+
9+
# # Untar bundle resources
10+
if [ -f "./ios/Bundle/assets.tar.gz" ]; then
11+
mkdir "./ios/Bundle/assets"
12+
tar xvzf "./ios/Bundle/assets.tar.gz" -C "./ios/Bundle/assets" && sudo find "./ios/Bundle/assets/." -type d -exec chmod u+rwx {} \;
13+
fi

appcenter-pre-build.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
export JAVA_HOME=${JAVA_HOME_17_X64}
4+
export PATH=${JAVA_HOME}/bin:${PATH}
5+
6+
if [[ $SUPPORTS_MOBILE_TOOLKIT == True ]]; then
7+
echo "Configuring template with mobile toolkit"
8+
npm run configure
9+
fi
10+
11+
INFO_PLIST=$APPCENTER_SOURCE_DIRECTORY/ios/$APPCENTER_XCODE_SCHEME/Info.plist
12+
if [[ -e "$INFO_PLIST" && $IS_DEV_APP == False ]]; then
13+
echo "Removing old MendixNative lib"
14+
rm -rf $APPCENTER_SOURCE_DIRECTORY/ios/MendixNative
15+
echo "Stripping references of old MendixNative (i386, x86_64, arm64) archs"
16+
LIB_PATH=$APPCENTER_SOURCE_DIRECTORY/ios/MendixNative/libMendix.a
17+
lipo -remove arm64 -output $LIB_PATH $LIB_PATH || true
18+
lipo -remove x86_64 -output $LIB_PATH $LIB_PATH || true
19+
lipo -remove i386 -output $LIB_PATH $LIB_PATH || true
20+
lipo -info $LIB_PATH || true
21+
22+
cat $INFO_PLIST
23+
fi
24+
25+
CODE_PUSH_KEY_FILE=$APPCENTER_SOURCE_DIRECTORY/android/app/src/main/res/raw/code_push_key
26+
if [[ -e "$CODE_PUSH_KEY_FILE" && $IS_DEV_APP == False ]]; then
27+
echo "Updating Android code_push_key resource file with code push key"
28+
sed -i '' 's/.*/'$CODE_PUSH_KEY'/' $CODE_PUSH_KEY_FILE;
29+
30+
cat $CODE_PUSH_KEY_FILE
31+
fi

0 commit comments

Comments
 (0)