forked from kevinobee/Sitecore.Ship
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kevinobee#66 Sitecore.Ship does not work with Sitecore 8.2 Update 1 f…
…or Azure Deployment
- Loading branch information
1 parent
c23a8ea
commit 053c436
Showing
5 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/Sitecore.Ship.Infrastructure/Extensions/PackageInstallationInfoExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Reflection; | ||
using Sitecore.Update; | ||
|
||
namespace Sitecore.Ship.Infrastructure.Extensions | ||
{ | ||
public static class PackageInstallationInfoExtensions | ||
{ | ||
public static void SetProcessingMode(this PackageInstallationInfo info) | ||
{ | ||
var prop = info.GetType().GetProperty("ProcessingMode", BindingFlags.Public | BindingFlags.Instance); | ||
if (prop == null || !prop.CanWrite) | ||
{ | ||
//Pre Sitecore 8.2 Update 2 Versions have no such property | ||
return; | ||
} | ||
|
||
// ProcessingMode.All = 2147483647 | ||
prop.SetValue(info, 2147483647); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...tecore.Ship.Infrastructure.Intg.Test/Extensions/PackageInstallationInfoExtensionsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Should; | ||
using Sitecore.Ship.Infrastructure.Extensions; | ||
using Sitecore.Update; | ||
using Xunit; | ||
|
||
#if SITECORE822 | ||
using Sitecore.Update.Utils; | ||
#endif | ||
|
||
|
||
namespace Sitecore.Ship.Infrastructure.Intg.Test.Extensions | ||
{ | ||
public class PackageInstallationInfoExtensionsTests | ||
{ | ||
[Fact] | ||
public void SetProcessingMode_sets_Mode_All() | ||
{ | ||
//Arrange | ||
var sut = new PackageInstallationInfo(); | ||
|
||
//Act | ||
sut.SetProcessingMode(); | ||
|
||
//Assert | ||
#if SITECORE822 | ||
sut.ProcessingMode.ShouldEqual(ProcessingMode.All); | ||
#endif | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters