File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1111cd " $SCRIPT_DIR "
1212git submodule init
1313git submodule sync
14- git submodule update --init --recursive
14+ git submodule update
15+
16+ # Restore bootconfig.json in shared submodule to committed placeholders
17+ git -C external/shared checkout -- samples/mobilesyncexplorer/bootconfig.json samples/accounteditor/bootconfig.json 2> /dev/null || true
1518
1619# Create test_credentials.json if needed to avoid build errors
1720if [ ! -f " shared/test/test_credentials.json" ]
2023fi
2124
2225# Prepare cordova.js
23- cd external/cordova
26+ pushd " external/cordova"
2427npm install
2528npm run prepare
29+ popd
30+
31+ # Substitute env vars if set in bootconfig.json
32+ BOOTCONFIG_JSON_PATHS=(
33+ " external/shared/samples/mobilesyncexplorer/bootconfig.json"
34+ " external/shared/samples/accounteditor/bootconfig.json"
35+ )
36+ for bootconfig in " ${BOOTCONFIG_JSON_PATHS[@]} " ; do
37+ if [ -n " ${MSDK_IOS_REMOTE_ACCESS_CONSUMER_KEY:- } " ]; then
38+ gsed -i " s|__CONSUMER_KEY__|${MSDK_IOS_REMOTE_ACCESS_CONSUMER_KEY} |g" " $bootconfig "
39+ fi
40+ if [ -n " ${MSDK_IOS_REMOTE_ACCESS_CALLBACK_URL:- } " ]; then
41+ gsed -i " s|__REDIRECT_URI__|${MSDK_IOS_REMOTE_ACCESS_CALLBACK_URL} |g" " $bootconfig "
42+ fi
43+ done
44+
45+ if [ -z " ${MSDK_IOS_REMOTE_ACCESS_CONSUMER_KEY:- } " ] || [ -z " ${MSDK_IOS_REMOTE_ACCESS_CALLBACK_URL:- } " ]; then
46+ echo " "
47+ echo " Note: MSDK_IOS_REMOTE_ACCESS_CONSUMER_KEY and/or MSDK_IOS_REMOTE_ACCESS_CALLBACK_URL are not set."
48+ echo " To run the sample applications, define these environment variables or ensure bootconfig.json"
49+ echo " files have remoteAccessConsumerKey and oauthRedirectURI set."
50+ echo " "
51+ fi
You can’t perform that action at this time.
0 commit comments