diff --git a/.gitignore b/.gitignore index f43ff35..9f7d0a2 100755 --- a/.gitignore +++ b/.gitignore @@ -153,9 +153,6 @@ captures/ # Remove after this framework is published on NPM code-push-plugin-testing-framework/node_modules -# RN New Version App Generation -Examples/testapp_rn - # Windows windows/.vs/ windows/obj/ @@ -188,4 +185,4 @@ ipch/ [Bb]in [Dd]ebug*/ [Rr]elease*/ -Ankh.NoLoad \ No newline at end of file +Ankh.NoLoad diff --git a/Examples/CodePushDemoApp/demo.js b/Examples/CodePushDemoApp/demo.js index f367990..22ca5ee 100644 --- a/Examples/CodePushDemoApp/demo.js +++ b/Examples/CodePushDemoApp/demo.js @@ -16,7 +16,7 @@ import CodePush from "react-native-code-push"; * different check frequency, such as ON_APP_START, for a 'hands-off' approach where CodePush.sync() does not * need to be explicitly called. All options of CodePush.sync() are also available in this decorator. */ -// @CodePush({ checkFrequency: CodePush.CheckFrequency.MANUAL }) +@CodePush({ checkFrequency: CodePush.CheckFrequency.MANUAL }) class CodePushDemoApp extends Component { constructor() { super(); @@ -156,6 +156,4 @@ const styles = StyleSheet.create({ }, }); -CodePushDemoApp = new CodePush(CodePushDemoApp); - AppRegistry.registerComponent("CodePushDemoApp", () => CodePushDemoApp); diff --git a/Examples/generate-app.sh b/Examples/generate-app.sh deleted file mode 100755 index ab8acca..0000000 --- a/Examples/generate-app.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015-present, Microsoft Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. - -# The goal of this script is to automate the testing of react-native, react-native-code-push and -# their internal compatibility. Run **./run.sh** to create an app and test it. - -# You can configure below variables in the bash. - -# 1. `code_push_version` -# 2. `react_native_code_push_version` -# 3. `react_native_version` -# 4. `mobile_env` - -# If you use other libs or packages, and fail to run this test, welcome to modify this script -# so that we can reproduce any issues that you have. - - -echo 'Automate synchronization testing between React Native and React Native Code Push'; -echo - -rm -rf testapp_rn - -# Please make sure you installed react native in your mac machine - -echo '************************ Configuration ***********************************'; - -#################### Code Push Config #########################W######################### - -code_push_cli_version=`code-push --version`; -echo 'Code Push CLI version: ' + ${code_push_cli_version}; - -#################### React Native Config ################################################# - -echo "list all react native versions: npm show react-native versions --json" -read -p "Enter react native version, [default] is the latest version:" react_native_version - -if [ ! $react_native_version]; then - react_native_version=`npm view react-native version` -fi -echo 'React Native version: ' + $react_native_version - -npm list -g rninit - -#################### React Native Code Push Config ###################################### - -echo "list all react native versions: npm show react-native-code-push versions --json" -read -p "Enter react native code push version, [default] is the latest version: " react_native_code_push_version - -if [ ! $react_native_code_push_version ]; then - react_native_code_push_version=`npm view react-native-code-push version` -fi -echo 'React Native Code Push version: ' + $react_native_code_push_version -echo - - -#################### Start Testing ######################################################### - -echo '********************* Yo, start to test ***************************************'; - -current_dir=`pwd`; -echo 'Current directory: ' + $current_dir; - -echo 'Create testapp_rn app'; -rninit init testapp_rn --source react-native@$react_native_version - -cd testapp_rn - -echo 'Install React Native Code Push Version $react_native_code_push_version' -npm install --save react-native-code-push@$react_native_code_push_version - -echo 'react native link to react native code push' -react-native link react-native-code-push - -rm index.android.js -rm index.ios.js -cp ../CodePushDemoApp/*js . -mkdir images -cp ../CodePushDemoApp/images/* images - -echo '********************* Running IOS ***************************************'; - -react-native run-ios - -echo '********************* Running Android ***************************************'; - -read -p "you need to open the android simulator manually before continue running this script. Enter [Enter] to continue" - -react-native run-android - -# cd .. -# rm -rf testapp -# exit; \ No newline at end of file