Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/CodePushDemoApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react": "16.0.0-alpha.12",
"react-native": "^0.47.1",
"react-native-code-push": "file:../../",
"react-native-windows": "^0.43.0-rc.0"
"react-native-windows": "^0.47.0-rc.5"
},
"devDependencies": {
"babel-jest": "20.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<ItemGroup>
<Reference Include="Facebook.Yoga, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Facebook.Yoga.1.2.0-pre1\lib\net45\Facebook.Yoga.dll</HintPath>
<HintPath>..\packages\Facebook.Yoga.1.5.0-pre1\lib\net45\Facebook.Yoga.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down Expand Up @@ -171,9 +171,9 @@
<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>
</PropertyGroup>
<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'))" />
<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'))" />
<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'))" />
</Target>
<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')" />
<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')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Facebook.Yoga" version="1.2.0-pre1" targetFramework="net46" />
<package id="Facebook.Yoga" version="1.5.0-pre1" targetFramework="net46" />
<package id="Microsoft.ChakraCore" version="1.4.1" targetFramework="net46" developmentDependency="true" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"Facebook.Yoga": "1.2.0-pre1",
"Facebook.Yoga": "1.5.0-pre1",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
},
"frameworks": {
Expand Down
14 changes: 14 additions & 0 deletions windows/CodePush.Net46/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,27 @@ internal async Task RollbackPackageAsync()
private async Task<IFolder> GetCurrentPackageFolderAsync()
{
var info = await GetCurrentPackageInfoAsync().ConfigureAwait(false);
if (info == null)
{
return null;
}
var packageHash = (string)info[CodePushConstants.CurrentPackageKey];
return packageHash == null ? null : await GetPackageFolderAsync(packageHash, false).ConfigureAwait(false);
}

private async Task<JObject> GetCurrentPackageInfoAsync()
{
var statusFile = await GetStatusFileAsync().ConfigureAwait(false);
var info = await CodePushUtils.GetJObjectFromFileAsync(statusFile).ConfigureAwait(false);

if (info != null)
{
return info;
}

// info file has been corrupted - re-create it
await statusFile.DeleteAsync().ConfigureAwait(false);
statusFile = await GetStatusFileAsync().ConfigureAwait(false);
return await CodePushUtils.GetJObjectFromFileAsync(statusFile).ConfigureAwait(false);
}

Expand Down