Skip to content

Commit 2d25e81

Browse files
committed
Merge branch 'master' into greenkeeper/prettier-1.4.2
* master: restart the app with react-native-restart add react-native-restart to xcode add react-native-restart to gradle add react-native-restart to package.json only install codepush for deploy builds remove moniker from settings remove the setting of "allaboutolaf" in ios builds remove the setting of "allaboutolaf" in android builds remove "allaboutolaf" key from package.json change where version comes from remove newline remove indent Remove codepush entirely
2 parents 71b0868 + ecb862b commit 2d25e81

File tree

17 files changed

+49
-158
lines changed

17 files changed

+49
-158
lines changed

android/app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ project.ext.react = [
7171
]
7272

7373
apply from: "../../node_modules/react-native/react.gradle"
74-
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
7574

7675
/**
7776
* Set this to true to create two separate APKs instead of one:
@@ -185,7 +184,6 @@ if (propFile.canRead()) {
185184
dependencies {
186185
// please keep this list sorted
187186
compile project(':bugsnag-react-native')
188-
compile project(':react-native-code-push')
189187
compile project(':react-native-custom-tabs')
190188
compile project(':react-native-device-info')
191189
compile project(':react-native-google-analytics-bridge')
@@ -194,6 +192,7 @@ dependencies {
194192
compile project(':react-native-maps')
195193
compile project(':react-native-network-info')
196194
compile project(':react-native-onesignal')
195+
compile project(':react-native-restart')
197196
compile project(':react-native-vector-icons')
198197
compile project(':react-native-view-shot')
199198
// this is for react-native itself

android/app/src/main/java/com/allaboutolaf/MainApplication.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// keep these sorted alphabetically
99
import com.airbnb.android.react.maps.MapsPackage;
10+
import com.avishayil.rnrestart.ReactNativeRestartPackage;
1011
import com.bugsnag.BugsnagReactNative;
1112
import com.BV.LinearGradient.LinearGradientPackage;
1213
import com.facebook.react.ReactApplication;
@@ -19,7 +20,6 @@
1920
import com.github.droibit.android.reactnative.customtabs.CustomTabsPackage;
2021
import com.idehub.GoogleAnalyticsBridge.GoogleAnalyticsBridgePackage;
2122
import com.learnium.RNDeviceInfo.RNDeviceInfo;
22-
import com.microsoft.codepush.react.CodePush;
2323
import com.oblador.keychain.KeychainPackage;
2424
import com.oblador.vectoricons.VectorIconsPackage;
2525
import com.pusherman.networkinfo.RNNetworkInfoPackage;
@@ -33,11 +33,6 @@
3333
public class MainApplication extends Application implements ReactApplication {
3434

3535
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
36-
@Override
37-
protected String getJSBundleFile() {
38-
return CodePush.getJSBundleFile();
39-
}
40-
4136
@Override
4237
public boolean getUseDeveloperSupport() {
4338
return BuildConfig.DEBUG;
@@ -49,13 +44,13 @@ protected List<ReactPackage> getPackages() {
4944
new MainReactPackage(),
5045
// please keep these sorted alphabetically
5146
BugsnagReactNative.getPackage(),
52-
new CodePush(getResources().getString(R.string.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
5347
new CustomTabsPackage(),
5448
new GoogleAnalyticsBridgePackage(),
5549
new KeychainPackage(),
5650
new LinearGradientPackage(),
5751
new MapsPackage(),
5852
new ReactNativeOneSignalPackage(),
53+
new ReactNativeRestartPackage(),
5954
new RNDeviceInfo(),
6055
new RNNetworkInfoPackage(),
6156
new RNViewShotPackage(),
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
<resources>
2-
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">5jvlQ5-xBItoSRqf-D-3hqdEsPTLEJN_nzUOz</string>
32
<string name="app_name">All About Olaf</string>
43
</resources>

android/settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ include ':app'
55
include ':bugsnag-react-native'
66
project(':bugsnag-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/bugsnag-react-native/android')
77

8-
include ':react-native-code-push'
9-
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
10-
118
include ':react-native-custom-tabs'
129
project(':react-native-custom-tabs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-custom-tabs/android')
1310

@@ -32,6 +29,9 @@ project(':react-native-network-info').projectDir = new File(rootProject.projectD
3229
include ':react-native-onesignal'
3330
project(':react-native-onesignal').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-onesignal/android')
3431

32+
include ':react-native-restart'
33+
project(':react-native-restart').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-restart/android')
34+
3535
include ':react-native-vector-icons'
3636
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
3737

fastlane/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ Run the appropriate action on CI
7878
fastlane android set_version
7979
```
8080
Include the build number in the version string
81-
### android codepush
82-
```
83-
fastlane android codepush
84-
```
85-
8681
### android matchesque
8782
```
8883
fastlane android matchesque
@@ -122,11 +117,6 @@ Upload dYSM symbols to Bugsnag from Apple
122117
fastlane ios ci-run
123118
```
124119
Run iOS builds or tests, as appropriate
125-
### ios codepush
126-
```
127-
fastlane ios codepush
128-
```
129-
130120
### ios set_version
131121
```
132122
fastlane ios set_version

fastlane/lib/util.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,3 @@ def auto_beta
6868

6969
beta #if last_commit != current_commit
7070
end
71-
72-
def codepush_cli(app:, channel: 'nightly', install_target: '~2.3 || ~2.3.0-beta')
73-
target = "--targetBinaryVersion '#{install_target}'"
74-
# `fastlane x` runs in the ./fastlane folder, so we have to go up a level
75-
Dir.chdir("..") do
76-
sh("code-push release-react '#{app}' ios -d '#{channel}' #{target}")
77-
end
78-
end

fastlane/platforms/android.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
build_type: 'Release',
99
print_command: true,
1010
print_command_output: true)
11-
11+
1212
UI.message lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS]
1313
end
1414

@@ -31,18 +31,10 @@
3131
# set the app version
3232
set_version
3333

34-
# set where this build came from
35-
set_package_data(data: {
36-
allaboutolaf: {
37-
source: 'beta',
38-
},
39-
})
40-
4134
# and run
4235
should_deploy = ENV['run_deploy'] == '1'
4336
if should_deploy
4437
auto_beta
45-
codepush
4638
else
4739
build
4840
end
@@ -56,10 +48,6 @@
5648
set_package_data(data: { version: "#{version}" })
5749
end
5850

59-
lane :codepush do
60-
codepush_cli(app: 'AllAboutOlaf-Android')
61-
end
62-
6351
desc 'extract the android keys from the match repo'
6452
lane :matchesque do
6553
match_dir = clone_match

fastlane/platforms/ios.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,15 @@
4444
# set the app version
4545
set_version
4646

47-
# set where this build came from
48-
set_package_data(data: {
49-
allaboutolaf: {
50-
source: 'beta',
51-
},
52-
})
53-
5447
# and run
5548
should_deploy = ENV['run_deploy'] == '1'
5649
if should_deploy
5750
auto_beta
58-
codepush
5951
else
6052
build
6153
end
6254
end
6355

64-
lane :codepush do
65-
codepush_cli(app: 'AllAboutOlaf-iOS')
66-
end
67-
6856
desc 'Include the build number in the version string'
6957
lane :set_version do |options|
7058
version = options[:version] || current_bundle_version
@@ -84,7 +72,7 @@
8472
create_keychain(name: keychain,
8573
password: password,
8674
timeout: 3600)
87-
75+
8876
# Set up code signing correctly
8977
# (more information: https://codesigning.guide)
9078
match(type: 'appstore', readonly: true)

0 commit comments

Comments
 (0)