Skip to content

Commit

Permalink
Merge pull request #85 from Sitecore/feature/9.1.1/kiosk-require
Browse files Browse the repository at this point in the history
9.1.1 - update for Kiosk deployment flag
  • Loading branch information
scottmulligan authored Apr 9, 2019
2 parents 519e5be + 50951b0 commit 2b07b6b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions fitness/server/CakeScripts/helper-methods.cake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class Configuration
public string MessageStatisticsApiKey {get;set;}
public string MarketingDefinitionsApiKey {get;set;}
public bool RunCleanBuilds {get;set;}
public bool KioskAppDeploy {get;set;}
public int DeployExmTimeout {get;set;}
public string BuildToolVersions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:unicorn="http://www.sitecore.net/xmlconfig/unicorn/">
<sitecore>
xmlns:unicorn="http://www.sitecore.net/xmlconfig/unicorn/"
xmlns:kiosk="http://www.sitecore.net/xmlconfig/kiosk/">
<sitecore kiosk:require="on">
<unicorn>
<configurations>
<configuration name="JSS.HabitatHome.Fitness.KioskAppItems" description="Includes content items required by Habitat Home Fitness Kiosk app" dependencies="JSS.HabitatHome.Fitness.AppItems">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<Content Include="App_Config\Include\Unicorn\Unicorn.DataProvider.config" />
<Content Include="App_Config\Include\Unicorn\Unicorn.config" />
<Content Include="App_Config\Include\Unicorn\Unicorn.AutoPublish.config" />
<None Include="Web.config.xdt" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
Expand Down
8 changes: 8 additions & 0 deletions fitness/server/Fitness.AppItems/Web.config.xdt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>

<!-- Enable/Disable Deployment of Habitat Fitness Kiosk App -->
<add key="kiosk:define" value="On" xdt:Transform="InsertIfMissing" xdt:Locator="Match(key)" />

</appSettings>
</configuration>
9 changes: 9 additions & 0 deletions fitness/server/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Task("Default")
.IsDependentOn("Modify-PublishSettings")
.IsDependentOn("Publish-All-Projects")
.IsDependentOn("Apply-Xml-Transform")
.IsDependentOn("Modify-Kiosk-Variable")
.IsDependentOn("Modify-Unicorn-Source-Folder")
.IsDependentOn("Post-Deploy");

Expand All @@ -46,6 +47,7 @@ Task("Quick-Deploy")
.IsDependentOn("Modify-PublishSettings")
.IsDependentOn("Publish-All-Projects")
.IsDependentOn("Apply-Xml-Transform")
.IsDependentOn("Modify-Kiosk-Variable")
.IsDependentOn("Modify-Unicorn-Source-Folder");

/*===============================================
Expand Down Expand Up @@ -179,4 +181,11 @@ Task("Apply-Xml-Transform").Does(() => {
Transform($"{configuration.ProjectSrcFolder}\\Fitness.Automation\\App_Data\\Config\\sitecore\\MarketingAutomation", $"{configuration.XConnectAutomationServiceRoot}\\App_Data\\Config\\sitecore\\MarketingAutomation");
});

Task("Modify-Kiosk-Variable").Does(() => {
var webConfigFile = File($"{configuration.WebsiteRoot}/Web.config");
var appSetting = "configuration/appSettings/add[@key='kiosk:define']/@value";
var appSettingValue = configuration.KioskAppDeploy ? "On" : "Off";
XmlPoke(webConfigFile, appSetting, appSettingValue);
});

RunTarget(target);
3 changes: 2 additions & 1 deletion fitness/server/cake-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"ProjectFolder": "C:\\projects\\Sitecore.HabitatHome.Omni\\fitness\\server",
"BuildConfiguration": "Debug",
"BuildToolVersions": "VS2017",
"RunCleanBuilds": true
"RunCleanBuilds": true,
"KioskAppDeploy": true
}

0 comments on commit 2b07b6b

Please sign in to comment.