Skip to content
Permalink
Browse files

#922: Rewrote the deployment process to use PS and simplified configu…

…ration for contributors.
  • Loading branch information...
AlexKasaku committed Aug 6, 2017
1 parent 81b23f2 commit 141aeb31b11a76af6e5056aa42391ce88fa03930
@@ -214,7 +214,6 @@ pip-log.txt
!/Libraries/PowerShell.MamlGenerator.dll

# Sitecore
deploy.targets
/Website/
/Database/
/Databases/
@@ -237,4 +236,12 @@ Cognifide.PowerShell.Sitecore8/obj/
Data/serialization/
.vs/config/applicationhost.config

# Temporary build folder
_Deploy

packages/

# User files
deploy.user.json
!deploy.user.json.sample
UserConfiguration/**/*.config
@@ -14,6 +14,9 @@
<TargetFrameworkProfile />
</PropertyGroup>
<Import Project="..\deploy.targets" Condition="Exists('..\deploy.targets')" />
<PropertyGroup>
<ProjectDeployPath>$(TempDeployPath)\Cognifide.PowerShell.Package</ProjectDeployPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
@@ -55,30 +58,26 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>echo "Copy build for Adam"
IF %25USERDOMAIN%25==DUNE (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\SXA\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore8\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore81\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore82\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore82u1\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore75\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore72\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore71\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore70\Website\bin\*.* /s /e /c /y
)

echo "Copy build for Mikey"
IF EXIST C:\Websites\dev.spe (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\Websites\dev.spe\Website\bin\*.* /s /e /c /y
)</PostBuildEvent>
</PropertyGroup>
<!-- 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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<AssemblyFiles Include="$(TargetDir)Cognifide.PowerShell*.*" >
<Visible>false</Visible>
</AssemblyFiles>
<ProjectDeployPathFiles Include="$(ProjectDeployPath)\**\*.*">
<Visible>false</Visible>
</ProjectDeployPathFiles>
</ItemGroup>
<PropertyGroup>
<ScriptLocation Condition=" '$(ScriptLocation)'=='' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\Post_Build.ps1'))</ScriptLocation>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(AssemblyFiles)" DestinationFolder="$(ProjectDeployPath)\bin" ContinueOnError="true" />
<Exec Command="PowerShell -NonInteractive -ExecutionPolicy Unrestricted -File &quot;$(ScriptLocation)&quot; -ProjectFilter &quot;$(MSBuildProjectName)&quot;" />
</Target>
</Project>
@@ -14,6 +14,9 @@
<TargetFrameworkProfile />
</PropertyGroup>
<Import Project="..\deploy.targets" Condition="Exists('..\deploy.targets')" />
<PropertyGroup>
<ProjectDeployPath>$(TempDeployPath)\Cognifide.PowerShell.Sitecore7</ProjectDeployPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
@@ -37,33 +40,33 @@
<HintPath>..\..\..\Windows\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\1.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Analytics">
<HintPath>$(SitecorePath)\bin\Sitecore.Analytics.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.Analytics.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Client">
<HintPath>$(SitecorePath)\bin\Sitecore.Client.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.Client.dll</HintPath>
</Reference>
<Reference Include="Sitecore.ContentSearch">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(LibrariesPath)\Sitecore.ContentSearch.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.ContentSearch.dll</HintPath>
</Reference>
<Reference Include="Sitecore.ContentSearch.Linq">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(LibrariesPath)\Sitecore.ContentSearch.Linq.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.ContentSearch.Linq.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Kernel">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SitecorePath)\bin\Sitecore.Kernel.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.Kernel.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Logging">
<HintPath>$(LibrariesPath)\Sitecore.Logging.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.Logging.dll</HintPath>
</Reference>
<Reference Include="Sitecore.NVelocity">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SitecorePath)\bin\Sitecore.NVelocity.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.NVelocity.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Update">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(LibrariesPath)\Sitecore.Update.dll</HintPath>
<HintPath>$(Sitecore7LibsPath)\Sitecore.Update.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
@@ -125,20 +128,28 @@
<Content Include="sitecore modules\PowerShell\Styles\VariablePrompt.css" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>IF %25USERDOMAIN%25==DUNE (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore70\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore72\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore71\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore75\Website\bin\*.* /s /e /c /y
)
</PostBuildEvent>
</PropertyGroup>

<!-- 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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<AssemblyFiles Include="$(TargetDir)Cognifide.PowerShell*.*" >
<Visible>false</Visible>
</AssemblyFiles>
<SitecoreModuleFiles Include="$(ProjectDir)sitecore modules\**\*.*" >
<Visible>false</Visible>
</SitecoreModuleFiles>
</ItemGroup>
<PropertyGroup>
<ScriptLocation Condition=" '$(ScriptLocation)'=='' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\Post_Build.ps1'))</ScriptLocation>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(AssemblyFiles)" DestinationFolder="$(ProjectDeployPath)\bin" ContinueOnError="true" />
<Copy SourceFiles="@(SitecoreModuleFiles)" DestinationFolder="$(ProjectDeployPath)\sitecore modules\%(RecursiveDir)" ContinueOnError="true" />
<Exec Command="PowerShell -NonInteractive -ExecutionPolicy Unrestricted -File &quot;$(ScriptLocation)&quot; -ProjectFilter &quot;$(MSBuildProjectName)&quot;" />
</Target>
</Project>
@@ -14,6 +14,9 @@
<TargetFrameworkProfile />
</PropertyGroup>
<Import Project="..\deploy.targets" Condition="Exists('..\deploy.targets')" />
<PropertyGroup>
<ProjectDeployPath>$(TempDeployPath)\Cognifide.PowerShell.Sitecore8</ProjectDeployPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
@@ -107,27 +110,28 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>echo "Copy build for Adam"
IF %25USERDOMAIN%25==DUNE (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\SXA\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore8\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore81\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore82\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore82u1\Website\bin\*.* /s /e /c /y
)

echo "Copy build for Mikey"
IF EXIST C:\Websites\dev.spe (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\Websites\dev.spe\Website\bin\*.* /s /e /c /y
)
</PostBuildEvent>
</PropertyGroup>
<!-- 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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<AssemblyFiles Include="$(TargetDir)Cognifide.PowerShell*.*" >
<Visible>false</Visible>
</AssemblyFiles>
<SitecoreModuleFiles Include="$(ProjectDir)sitecore modules\**\*.*" >
<Visible>false</Visible>
</SitecoreModuleFiles>
</ItemGroup>
<PropertyGroup>
<ScriptLocation Condition=" '$(ScriptLocation)'=='' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\Post_Build.ps1'))</ScriptLocation>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(AssemblyFiles)" DestinationFolder="$(ProjectDeployPath)\bin" ContinueOnError="true" />
<Copy SourceFiles="@(SitecoreModuleFiles)" DestinationFolder="$(ProjectDeployPath)\sitecore modules\%(RecursiveDir)" ContinueOnError="true" />
<Exec Command="PowerShell -NonInteractive -ExecutionPolicy Unrestricted -File &quot;$(ScriptLocation)&quot; -ProjectFilter &quot;$(MSBuildProjectName)&quot;" />
</Target>

</Project>

This file was deleted.

@@ -10,6 +10,9 @@
<IISExpressUseClassicPipelineMode />
</PropertyGroup>
<Import Project="..\deploy.targets" Condition="Exists('..\deploy.targets')" />
<PropertyGroup>
<ProjectDeployPath>$(TempDeployPath)\Cognifide.PowerShell</ProjectDeployPath>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -542,8 +545,9 @@
<Content Include="packages.config" />
<Content Include="App_Config\Include\Unicorn\Unicorn.DataProvider.config.disabled" />
<Content Include="App_Config\Include\Unicorn\Unicorn.SharedSecret.config.example" />
<Content Include="App_Config\Include\Cognifide.PowerShell.Serialization.config" />
<Content Include="App_Config\Include\Cognifide.PowerShell.Serialization.User.config" />
<Content Include="App_Config\Include\Cognifide.PowerShell.Serialization.config">
<SubType>Designer</SubType>
</Content>
<Content Include="App_Config\Include\Rainbow.config" />
<Content Include="App_Config\Include\Unicorn\Unicorn.zSharedSecret.config.example" />
<Content Include="App_Config\Include\Unicorn\Unicorn.UI.config" />
@@ -674,11 +678,8 @@
<Content Include="App_Config\Include\Cognifide.PowerShell.Events.config.disabled" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<CallTarget Targets="DeployToWeb" Condition="$(SitecorePath) != ''" />
</Target>
<Target Name="DeployToWeb">
<MSBuild Projects="Cognifide.PowerShell.csproj" Targets="ResolveReferences;_CopyWebApplication" Properties="WebProjectOutputDir=$(SitecorePath);OutDir=$(SitecorePath)\bin\" />
<MSBuild Projects="Cognifide.PowerShell.csproj" Targets="ResolveReferences;_CopyWebApplication" Properties="WebProjectOutputDir=$(ProjectDeployPath);OutDir=$(ProjectDeployPath)\bin\" />
</Target>
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
@@ -691,52 +692,19 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>echo "Copy build for Adam"

IF %25USERDOMAIN%25==DUNE (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\SXA\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore8\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore81\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore82\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore82u1\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore75\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore72\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore71\Website\bin\*.* /s /e /c /y
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\inetpub\wwwroot\Sitecore70\Website\bin\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\SXA\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore8\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore81\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore82\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore82u1\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore75\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore72\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore71\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\inetpub\wwwroot\Sitecore70\Website\App_Config\Include\*.* /s /e /c /y

xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\SXA\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore8\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore81\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore82\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore82u1\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore75\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore72\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore71\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\inetpub\wwwroot\Sitecore70\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
)

echo "Copy build for Mikey"
IF EXIST C:\Websites\dev.spe (
xcopy $(TargetDir)Cognifide.PowerShell*.* C:\Websites\dev.spe\Website\bin\*.* /s /e /c /y
xcopy $(ProjectDir)App_Config\Include\*.* C:\Websites\dev.spe\Website\App_Config\Include\*.* /s /e /c /y
xcopy $(ProjectDir)sitecore\shell\Themes\Standard\*.* C:\Websites\dev.spe\Website\sitecore\shell\Themes\Standard\*.* /s /e /c /y
)</PostBuildEvent>
</PropertyGroup>
<!-- 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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<ScriptLocation Condition=" '$(ScriptLocation)'=='' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\Post_Build.ps1'))</ScriptLocation>
</PropertyGroup>
<Target Name="AfterBuild">
<CallTarget Targets="DeployToWeb" Condition="$(TempDeployPath) != ''" />
<Exec Command="PowerShell -NonInteractive -ExecutionPolicy Unrestricted -File &quot;$(ScriptLocation)&quot; -ProjectFilter &quot;$(MSBuildProjectName)&quot;" />
</Target>
</Project>

0 comments on commit 141aeb3

Please sign in to comment.
You can’t perform that action at this time.