Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit d392e0a

Browse files
Merge branch 'master' of https://github.com/Microsoft/react-native-code-push into upstream/master
2 parents 4658032 + 129e019 commit d392e0a

File tree

6 files changed

+38
-13
lines changed

6 files changed

+38
-13
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
22

3-
### Description
3+
### Steps to Reproduce
4+
1.
5+
2.
6+
3.
47

5-
[FILL THIS OUT: Explain what you did, what you expected to happen, and what actually happens. Also exact reproduction steps and stack trace will be much appreciated.]
8+
### Expected Behavior
9+
What you expected to happen?
610

7-
### Reproduction
11+
### Actual Behavior
12+
What actually happens?
13+
```
14+
STACK TRACE AND/OR SCREENSHOTS
15+
```
816

9-
[FILL THIS OUT: If possible try to reproduce your bug on our basic sample: https://github.com/Microsoft/react-native-code-push/tree/master/Examples/CodePushDemoApp. If you can't reproduce the bug on it, provide us as much info as possible about your project.]
17+
### Reproducible Demo
1018

11-
### Additional Information
19+
* Download https://github.com/Microsoft/react-native-code-push/archive/master.zip and unzip. From `Examples` folder run `node create-app.js appName react-native@0.47.1 react-native-code-push@5.0.0-beta` command to generate plain CodePushified React Native app. Please see description on top of `create-app.js` file content if needed
20+
* If you can't reproduce the bug on it, provide us as much info as possible about your project
21+
22+
### Environment
1223

1324
* react-native-code-push version:
1425
* react-native version:
@@ -17,4 +28,3 @@ Thanks so much for filing an issue or feature request! Please fill out the follo
1728
* Does this reproduce on a simulator, or only on a physical device?
1829

1930
(The more info the faster we will be able to address it!)
20-

Examples/CodePushDemoApp/windows/CodePushDemoApp.Wpf/CodePushDemoApp.Wpf.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<ItemGroup>
103103
<Reference Include="Facebook.Yoga, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
104104
<SpecificVersion>False</SpecificVersion>
105-
<HintPath>..\packages\Facebook.Yoga.1.2.0-pre1\lib\net45\Facebook.Yoga.dll</HintPath>
105+
<HintPath>..\packages\Facebook.Yoga.1.5.0-pre1\lib\net45\Facebook.Yoga.dll</HintPath>
106106
<Private>True</Private>
107107
</Reference>
108108
<Reference Include="System" />
@@ -171,9 +171,9 @@
171171
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
172172
</PropertyGroup>
173173
<Error Condition="!Exists('..\packages\Microsoft.ChakraCore.1.4.1\build\netstandard1.0\Microsoft.ChakraCore.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ChakraCore.1.4.1\build\netstandard1.0\Microsoft.ChakraCore.props'))" />
174-
<Error Condition="!Exists('..\packages\Facebook.Yoga.1.2.0-pre1\build\net45\Facebook.Yoga.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Facebook.Yoga.1.2.0-pre1\build\net45\Facebook.Yoga.targets'))" />
174+
<Error Condition="!Exists('..\packages\Facebook.Yoga.1.5.0-pre1\build\net45\Facebook.Yoga.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Facebook.Yoga.1.5.0-pre1\build\net45\Facebook.Yoga.targets'))" />
175175
</Target>
176-
<Import Project="..\packages\Facebook.Yoga.1.2.0-pre1\build\net45\Facebook.Yoga.targets" Condition="Exists('..\packages\Facebook.Yoga.1.2.0-pre1\build\net45\Facebook.Yoga.targets')" />
176+
<Import Project="..\packages\Facebook.Yoga.1.5.0-pre1\build\net45\Facebook.Yoga.targets" Condition="Exists('..\packages\Facebook.Yoga.1.5.0-pre1\build\net45\Facebook.Yoga.targets')" />
177177
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
178178
Other similar extension points exist, see Microsoft.Common.targets.
179179
<Target Name="BeforeBuild">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Facebook.Yoga" version="1.2.0-pre1" targetFramework="net46" />
3+
<package id="Facebook.Yoga" version="1.5.0-pre1" targetFramework="net46" />
44
<package id="Microsoft.ChakraCore" version="1.4.1" targetFramework="net46" developmentDependency="true" />
55
</packages>

Examples/CodePushDemoApp/windows/CodePushDemoApp/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"Facebook.Yoga": "1.2.0-pre1",
3+
"Facebook.Yoga": "1.5.0-pre1",
44
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
55
},
66
"frameworks": {

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ We try our best to maintain backwards compatability of our plugin with previous
6363
| v0.43-v0.44 | v2.0+ *(RN refactored uimanager dependencies)* |
6464
| v0.45 | v3.0+ *(RN refactored instance manager code)* |
6565
| v0.46 | v4.0+ *(RN refactored js bundle loader code)* |
66-
| v0.47 | v5.0+ *(RN removed unused registration of JS modules)*|
67-
| v0.48+ | TBD :) We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.
66+
| v0.47-v0.48 | v5.0+ *(RN removed unused registration of JS modules)*|
67+
| v0.49+ | TBD :) We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.
6868

6969
### Supported Components
7070

@@ -101,6 +101,7 @@ As with all other React Native plugins, the integration experience is different
101101

102102
If you want to see how other projects have integrated with CodePush, you can check out the excellent [example apps](#example-apps--starters) provided by the community. Additionally, if you'd like to quickly familiarize yourself with CodePush + React Native, you can check out the awesome getting started videos produced by [Bilal Budhani](https://www.youtube.com/watch?v=uN0FRWk-YW8&feature=youtu.be) and/or [Deepak Sisodiya ](https://www.youtube.com/watch?v=f6I9y7V-Ibk).
103103

104+
*NOTE: This guide assumes you have used the `react-native init` command to initialize your React Native project. As of March 2017, the command `create-react-native-app` can also be used to initialize a React Native project. If using this command, please run `npm run eject` in your project's home directory to get a project very similar to what `react-native init` would have created.*
104105

105106
Then continue with installing the native module
106107
* [iOS Setup](docs/setup-ios.md)

windows/CodePush.Net46/UpdateManager.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,27 @@ internal async Task RollbackPackageAsync()
266266
private async Task<IFolder> GetCurrentPackageFolderAsync()
267267
{
268268
var info = await GetCurrentPackageInfoAsync().ConfigureAwait(false);
269+
if (info == null)
270+
{
271+
return null;
272+
}
269273
var packageHash = (string)info[CodePushConstants.CurrentPackageKey];
270274
return packageHash == null ? null : await GetPackageFolderAsync(packageHash, false).ConfigureAwait(false);
271275
}
272276

273277
private async Task<JObject> GetCurrentPackageInfoAsync()
274278
{
275279
var statusFile = await GetStatusFileAsync().ConfigureAwait(false);
280+
var info = await CodePushUtils.GetJObjectFromFileAsync(statusFile).ConfigureAwait(false);
281+
282+
if (info != null)
283+
{
284+
return info;
285+
}
286+
287+
// info file has been corrupted - re-create it
288+
await statusFile.DeleteAsync().ConfigureAwait(false);
289+
statusFile = await GetStatusFileAsync().ConfigureAwait(false);
276290
return await CodePushUtils.GetJObjectFromFileAsync(statusFile).ConfigureAwait(false);
277291
}
278292

0 commit comments

Comments
 (0)