Skip to content

Commit de854b6

Browse files
committed
#311 : Added a minimal configuration package.
Need to rename the minimal config after install.
1 parent 6202fa8 commit de854b6

File tree

3 files changed

+39
-14
lines changed

3 files changed

+39
-14
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
2+
<sitecore>
3+
<controlSources>
4+
<source mode="on" namespace="Cognifide.PowerShell.Client.Controls" assembly="Cognifide.PowerShell">
5+
<patch:delete />
6+
</source>
7+
<source mode="on" namespace="Cognifide.PowerShell.Client.Applications"
8+
folder="/sitecore modules/Shell/PowerShell/" deep="true">
9+
<patch:delete />
10+
</source>
11+
</controlSources>
12+
</sitecore>
13+
</configuration>

Cognifide.PowerShell/Data/serialization/master/sitecore/system/Modules/PowerShell/Script Library/Platform/Development/PowerShell Extensions Maintenance/Prepare Console Distribution.item

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ templatekey: PowerShell Script
1313
field: {B1A94FF0-6897-47C0-9C51-AA6ACB80B1F0}
1414
name: Script
1515
key: script
16-
content-length: 8244
16+
content-length: 9041
1717

1818
# Clear test items:
1919
# Get-ChildItem 'master:\system\Modules\PowerShell\Script Library' -recurse | Where-Object { ($_.Name -match '\(test\)') } | Remove-Item
@@ -34,6 +34,8 @@ the following path in your Script Library:
3434

3535
$Version = "$((Get-Host).Version.Major).$((Get-Host).Version.Minor)"
3636

37+
# Build Standard Package
38+
3739
$package = new-package "Sitecore PowerShell Extensions";
3840
$package.Sources.Clear();
3941

@@ -175,10 +177,17 @@ Export-Package -Project $package -Path "$packageName.xml"
175177
Export-Package -Project $package -Path "$packageName.zip" -Zip
176178
Download-File "$SitecorePackageFolder\$packageName.zip"
177179

180+
# Build Minimal Package
181+
182+
Import-Function -Name Compress-Archive
183+
184+
Compress-Archive -Path "$($AppPath)App_Config" -DestinationPath "$($SitecorePackageFolder)\SPE-$($Version) for Sitecore $($SitecoreVersion.Major) - CD.zip" -Include "Cognifide.PowerShell.config", "Cognifide.PowerShell.Minimal.config.disabled"
185+
Compress-Archive -Path "$($AppPath)bin" -DestinationPath "$($SitecorePackageFolder)\SPE-$($Version) for Sitecore $($SitecoreVersion.Major) - CD.zip" -Include "Cognifide.PowerShell.dll", "Cognifide.PowerShell.VersionSpecific.dll" -Update
186+
Compress-Archive -Path "$($AppPath)sitecore modules" -DestinationPath "$($SitecorePackageFolder)\SPE-$($Version) for Sitecore $($SitecoreVersion.Major) - CD.zip" -Include "web.config", "RemoteAutomation.asmx" -Update
178187
----version----
179188
language: en
180189
version: 1
181-
revision: 05254647-6225-4f78-b109-7ba24e577716
190+
revision: c82911ea-8ae3-4f9c-9f94-aea8723ebb6b
182191

183192
----field----
184193
field: {25BED78C-4957-4165-998A-CA1B52F67497}
@@ -193,14 +202,14 @@ name: __Revision
193202
key: __revision
194203
content-length: 36
195204

196-
05254647-6225-4f78-b109-7ba24e577716
205+
c82911ea-8ae3-4f9c-9f94-aea8723ebb6b
197206
----field----
198207
field: {D9CF14B1-FA16-4BA6-9288-E8A174D4D522}
199208
name: __Updated
200209
key: __updated
201-
content-length: 34
210+
content-length: 35
202211

203-
20150708T154932:635719673720175781
212+
20150731T221906:635739779469719130Z
204213
----field----
205214
field: {BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A}
206215
name: __Updated by

Cognifide.PowerShell/Data/serialization/master/sitecore/system/Modules/PowerShell/Script Library/Platform/Functions/Compress-Archive.item

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ templatekey: PowerShell Script
1313
field: {B1A94FF0-6897-47C0-9C51-AA6ACB80B1F0}
1414
name: Script
1515
key: script
16-
content-length: 8507
16+
content-length: 8693
1717

1818
<#
1919
.SYNOPSIS
@@ -95,7 +95,10 @@ function Compress-Archive {
9595

9696
[System.IO.Compression.CompressionLevel]$CompressionLevel = [System.IO.Compression.CompressionLevel]::Optimal,
9797

98-
[switch]$Update
98+
[switch]$Update,
99+
100+
[ValidateNotNullOrEmpty()]
101+
[string[]]$Include = "*"
99102
)
100103

101104
begin {
@@ -139,8 +142,8 @@ function Compress-Archive {
139142
[System.IO.Compression.ZipArchive]$Archive,
140143
[string]$Path
141144
)
142-
143-
$file = New-Object System.IO.FileInfo $Path
145+
Write-Verbose $Path
146+
$file = New-Object System.IO.FileInfo (Resolve-Path -Path $Path).ProviderPath
144147
Write-Verbose "Adding the file $($file.Name) to the archive."
145148
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($Archive, $file.FullName, $File.Name, $CompressionLevel) | Out-Null
146149
}
@@ -152,10 +155,10 @@ function Compress-Archive {
152155
[string]$Path
153156
)
154157

155-
$directory = New-Object System.IO.DirectoryInfo $Path
158+
$directory = New-Object System.IO.DirectoryInfo (Resolve-Path -Path $Path).ProviderPath
156159
Write-Verbose "Adding the directory $($directory.FullName) to the archive."
157160
$zipArchive.CreateEntry($directory.Name + '\') | Out-Null
158-
$items = Get-ChildItem -Path $directory -Recurse
161+
$items = Get-ChildItem -Path $directory -Recurse -Include $Include
159162
$dir = [Uri]($directory.Parent.FullName + '\')
160163
foreach($item in $items) {
161164
$subdir = [Uri]($item.FullName + (@{$true="\";$false=""}[$item.PSIsContainer]))
@@ -205,7 +208,7 @@ function Compress-Archive {
205208
----version----
206209
language: en
207210
version: 1
208-
revision: f990165f-4e4b-4aee-93d2-75d03522df67
211+
revision: 857ab097-947d-4842-b489-b846b89b718b
209212

210213
----field----
211214
field: {25BED78C-4957-4165-998A-CA1B52F67497}
@@ -220,14 +223,14 @@ name: __Revision
220223
key: __revision
221224
content-length: 36
222225

223-
f990165f-4e4b-4aee-93d2-75d03522df67
226+
857ab097-947d-4842-b489-b846b89b718b
224227
----field----
225228
field: {D9CF14B1-FA16-4BA6-9288-E8A174D4D522}
226229
name: __Updated
227230
key: __updated
228231
content-length: 34
229232

230-
20150719T221710:635729410304888187
233+
20150731T211438:635739740782230533
231234
----field----
232235
field: {BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A}
233236
name: __Updated by

0 commit comments

Comments
 (0)