Skip to content

Commit

Permalink
Merge pull request #19 from Sarafian/develop
Browse files Browse the repository at this point in the history
Releasing 1.2
  • Loading branch information
Sarafian authored Feb 24, 2017
2 parents 7130445 + 23942b1 commit 5b7ef24
Show file tree
Hide file tree
Showing 14 changed files with 358 additions and 17 deletions.
7 changes: 1 addition & 6 deletions Automation/Publish-Module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ switch ($PSCmdlet.ParameterSetName)
}
}

if((& "$PSScriptRoot\Test-All.ps1") -ne 0)
{
Write-Warning "Tests failed. Stopping..."
return
}
$changeLogPath="$PSScriptRoot\..\CHANGELOG.md"
$changeLog=Get-Content -Path $changeLogPath
if($publishDebug)
Expand Down Expand Up @@ -168,7 +163,7 @@ foreach($moduleName in $moduleNamesToPublish)
$guid="c1e7cbac-9e47-4906-8281-5f16471d7ccd"

$possition = "None"
$releaseNotes=foreach ($line in $changelogContent) {
$releaseNotes=foreach ($line in $changeLog) {
if ($line.StartsWith("**")){
if($possition -eq "None"){
$possition="This Version"
Expand Down
26 changes: 22 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
**1.2**

Issues:
- GH-13: Initialize-ISHRegional should not require elevated permissions.
- GH-15: Azure file and blob storage support.
- GH-17: Initialize-ISHRegional sets incorrect registry key for 'Long Time' format.

In detail:
- `Initialize-ISHRegional` doesn't check for elevated permissions.
- `Get-ISHPrerequisites` now supports Azure file and blob storage as source.
- `Set-ISHToolAntennaHouseLicense` now supports Azure file and blob storage as source.
- `Get-ISHCD` now supports Azure file and blob storage as source.

**1.1**

Issues:
- GH-3: Amazon Web Services S3 bucket support.
- GH-7: Download and expand ISHCD.

In detail:
- Upgraded the SDLDevTools PowerShell module to version 0.2
- `Get-ISHPrerequisites` now supports S3 buckets as source.
- `Get-ISHPrerequisites` now supports S3 buckets as source.
- `Set-ISHToolAntennaHouseLicense` now supports S3 buckets as source.
- `Test-RunningAsElevated` is now a private function in the module.
- New `Get-ISHCD` cmdlet:
- New `Get-ISHCD` cmdlet:
- Downloads a CD from FTP or AWS S3 bucket.
- Returns the available CDs
- New `Expand-ISHCD` cmdlet expands a CD into `C:\ISHCD`.
- Returns the available CDs.
- New `Expand-ISHCD` cmdlet expands a CD into `C:\ISHCD`.

**1.0**

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The module can retrieve files from the following type of sources:

- FTP.
- Amazon Web Services S3 bucket.
- Azure file and blob storage.

For each different type of credentials are required.

Expand Down
52 changes: 52 additions & 0 deletions Source/Modules/ISHServer/Get-ISHCD.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,26 @@ function Get-ISHCD
[string]$SecretKey,
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
[string]$SessionToken,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[string]$ShareName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[ValidatePattern(".+\.[0-9]+\.0\.[0-9]+\.[0-9]+.*\.exe")]
[string]$Path,
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$ContainerName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[ValidatePattern(".+\.[0-9]+\.0\.[0-9]+\.[0-9]+.*\.exe")]
[string]$BlobName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$StorageAccountName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$StorageAccountKey,
[Parameter(Mandatory=$false,ParameterSetName="From FTP")]
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
[Parameter(Mandatory=$false,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$false,ParameterSetName="From Azure BlobStorage")]
[switch]$Expand=$false,
[Parameter(Mandatory=$true,ParameterSetName="List")]
[switch]$ListAvailable
Expand Down Expand Up @@ -97,6 +115,40 @@ function Get-ISHCD
}
break
}
'From Azure FileStorage' {
. $PSScriptRoot\Private\Get-ISHAzureFileObject.ps1
$hash=@{
ShareName=$ShareName
LocalFolder=$localPath
StorageAccountName=$StorageAccountName
StorageAccountKey=$StorageAccountKey
}

$newItem=Get-ISHAzureFileObject -Path $Path @hash
if($Expand)
{
. $PSScriptRoot\Expand-ISHCD.ps1
Expand-ISHCD -FileName $newItem.Name
}
break
}
'From Azure BlobStorage' {
. $PSScriptRoot\Private\Get-ISHAzureBlobObject.ps1
$hash=@{
ContainerName=$ContainerName
LocalFolder=$localPath
StorageAccountName=$StorageAccountName
StorageAccountKey=$StorageAccountKey
}

$newItem=Get-ISHAzureBlobObject -BlobName $BlobName @hash
if($Expand)
{
. $PSScriptRoot\Expand-ISHCD.ps1
Expand-ISHCD -FileName $newItem.Name
}
break
}
'List' {
function RemoveSDLSegments([string]$path)
{
Expand Down
51 changes: 51 additions & 0 deletions Source/Modules/ISHServer/Get-ISHPrerequisites.ISH12.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ function Get-ISHPrerequisites
[string]$SecretKey,
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
[string]$SessionToken,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[string]$ShareName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$ContainerName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$FolderPath,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$StorageAccountName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$StorageAccountKey,
[Parameter(Mandatory=$true,ParameterSetName="No Download")]
[switch]$FileNames
)
Expand All @@ -63,6 +76,10 @@ function Get-ISHPrerequisites
{
$FolderKey+="/"
}
if(-not ($FolderPath.EndsWith("/")))
{
$FolderPath+="/"
}
}

process
Expand Down Expand Up @@ -124,6 +141,40 @@ function Get-ISHPrerequisites
Get-ISHS3Object -Key $keys @hash | Out-Null
break
}
'From Azure FileStorage' {
. $PSScriptRoot\Private\Get-ISHAzureFileObject.ps1

$localPath=Get-ISHServerFolderPath
$hash=@{
ShareName=$ShareName
LocalFolder=$localPath
StorageAccountName=$StorageAccountName
StorageAccountKey=$StorageAccountKey
}
$paths=@()
$filesToDownload | ForEach-Object {
$paths+="$FolderPath$_"
}
Get-ISHAzureFileObject -Path $paths @hash | Out-Null
break
}
'From Azure BlobStorage' {
. $PSScriptRoot\Private\Get-ISHAzureBlobObject.ps1

$localPath=Get-ISHServerFolderPath
$hash=@{
ContainerName=$ContainerName
LocalFolder=$localPath
StorageAccountName=$StorageAccountName
StorageAccountKey=$StorageAccountKey
}
$blobs=@()
$filesToDownload | ForEach-Object {
$blobs+="$FolderPath$_"
}
Get-ISHAzureBlobObject -BlobName $blobs @hash | Out-Null
break
}
'No Download' {
if($FileNames)
{
Expand Down
51 changes: 51 additions & 0 deletions Source/Modules/ISHServer/Get-ISHPrerequisites.ISH13.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ function Get-ISHPrerequisites
[string]$SecretKey,
[Parameter(Mandatory=$false,ParameterSetName="From AWS S3")]
[string]$SessionToken,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[string]$ShareName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$ContainerName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$FolderPath,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$StorageAccountName,
[Parameter(Mandatory=$true,ParameterSetName="From Azure FileStorage")]
[Parameter(Mandatory=$true,ParameterSetName="From Azure BlobStorage")]
[string]$StorageAccountKey,
[Parameter(Mandatory=$true,ParameterSetName="No Download")]
[switch]$FileNames
)
Expand All @@ -63,6 +76,10 @@ function Get-ISHPrerequisites
{
$FolderKey+="/"
}
if(-not ($FolderPath.EndsWith("/")))
{
$FolderPath+="/"
}
}

process
Expand Down Expand Up @@ -133,6 +150,40 @@ function Get-ISHPrerequisites
Get-ISHS3Object -Key $keys @hash | Out-Null
break
}
'From Azure FileStorage' {
. $PSScriptRoot\Private\Get-ISHAzureFileObject.ps1

$localPath=Get-ISHServerFolderPath
$hash=@{
ShareName=$ShareName
LocalFolder=$localPath
StorageAccountName=$StorageAccountName
StorageAccountKey=$StorageAccountKey
}
$paths=@()
$filesToDownload | ForEach-Object {
$paths+="$FolderPath$_"
}
Get-ISHAzureFileObject -Path $paths @hash | Out-Null
break
}
'From Azure BlobStorage' {
. $PSScriptRoot\Private\Get-ISHAzureBlobObject.ps1

$localPath=Get-ISHServerFolderPath
$hash=@{
ContainerName=$ContainerName
LocalFolder=$localPath
StorageAccountName=$StorageAccountName
StorageAccountKey=$StorageAccountKey
}
$blobs=@()
$filesToDownload | ForEach-Object {
$blobs+="$FolderPath$_"
}
Get-ISHAzureBlobObject -BlobName $blobs @hash | Out-Null
break
}
'No Download' {
if($FileNames)
{
Expand Down
4 changes: 3 additions & 1 deletion Source/Modules/ISHServer/ISHServer.12.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ $exportNames=@(
$privateNames=@(
"Get-ISHFTPItem"
"Get-ISHS3Object"
"Get-ISHAzureFileObject"
"Get-ISHAzureBlobObject"
"Test-RunningAsElevated"
)

$privateNames | ForEach-Object {. $PSScriptRoot\Private\$_.ps1 }
$exportNames | ForEach-Object {. $PSScriptRoot\$_.ps1 }

$exportedMemberNames=$exportNames -replace "\.ISH[0-9]+",""
Export-ModuleMember $exportedMemberNames
Export-ModuleMember $exportedMemberNames
4 changes: 3 additions & 1 deletion Source/Modules/ISHServer/ISHServer.13.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ $exportNames=@(
$privateNames=@(
"Get-ISHFTPItem"
"Get-ISHS3Object"
"Get-ISHAzureFileObject"
"Get-ISHAzureBlobObject"
"Test-RunningAsElevated"
)

$privateNames | ForEach-Object {. $PSScriptRoot\Private\$_.ps1 }
$exportNames | ForEach-Object {. $PSScriptRoot\$_.ps1 }

$exportedMemberNames=$exportNames -replace "\.ISH[0-9]+",""
Export-ModuleMember $exportedMemberNames
Export-ModuleMember $exportedMemberNames
5 changes: 2 additions & 3 deletions Source/Modules/ISHServer/Initialize-ISHRegional.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ function Initialize-ISHRegional

begin
{
. $PSScriptRoot\Private\Test-RunningAsElevated.ps1
Test-RunningAsElevated -StopCallerPSCmdlet $PSCmdlet

}

process
Expand All @@ -38,7 +37,7 @@ function Initialize-ISHRegional
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name sShortDate -Value "dd/MM/yyyy"
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name sLongDate -Value "ddddd d MMMM yyyy"
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name sShortTime -Value "HH:mm:ss"
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name sLongTime -Value "HH:mm:ss"
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name sTimeFormat -Value "HH:mm:ss"
Write-Verbose "Set Formatters"
}
end
Expand Down
2 changes: 1 addition & 1 deletion Source/Modules/ISHServer/Initialize-ISHRegionalDefault.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Initialize-ISHRegionalDefault
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\International" -Name sShortDate -Value "dd/MM/yyyy"
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\International" -Name sLongDate -Value "ddddd d MMMM yyyy"
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\International" -Name sShortTime -Value "HH:mm:ss"
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\International" -Name sLongTime -Value "HH:mm:ss"
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\International" -Name sTimeFormat -Value "HH:mm:ss"
Write-Verbose "Set Formatters for DEFAULT account"
}
end
Expand Down
Loading

0 comments on commit 5b7ef24

Please sign in to comment.