diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..559be7b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ReportingServicesTools.Designer.ps1 \ No newline at end of file diff --git a/ReportingServicesTools/Functions/CatalogItems/New-RsDataSource.ps1 b/ReportingServicesTools/Functions/CatalogItems/New-RsDataSource.ps1 index e76ac359..74da5bd7 100644 --- a/ReportingServicesTools/Functions/CatalogItems/New-RsDataSource.ps1 +++ b/ReportingServicesTools/Functions/CatalogItems/New-RsDataSource.ps1 @@ -205,7 +205,7 @@ function New-RsDataSource throw (New-Object System.Exception("Exception occurred while converting credential retrieval to enum! $($_.Exception.Message)", $_.Exception)) } - $additionalProperties = New-Object System.Collections.Generic.List[$propertyDataType] + $additionalProperties = New-Object System.Collections.Generic.List["$propertyDataType"] if ($Description) { $descriptionProperty = New-Object $propertyDataType diff --git a/ReportingServicesTools/Functions/CatalogItems/New-RsFolder.ps1 b/ReportingServicesTools/Functions/CatalogItems/New-RsFolder.ps1 index 54c0cdbc..45bf3205 100644 --- a/ReportingServicesTools/Functions/CatalogItems/New-RsFolder.ps1 +++ b/ReportingServicesTools/Functions/CatalogItems/New-RsFolder.ps1 @@ -88,7 +88,7 @@ function New-RsFolder $namespace = $proxy.GetType().Namespace $propertyDataType = "$namespace.Property" - $additionalProperties = New-Object System.Collections.Generic.List[$propertyDataType] + $additionalProperties = New-Object System.Collections.Generic.List["$propertyDataType"] if ($Description) { $descriptionProperty = New-Object $propertyDataType diff --git a/ReportingServicesTools/Functions/CatalogItems/Write-RsCatalogItem.ps1 b/ReportingServicesTools/Functions/CatalogItems/Write-RsCatalogItem.ps1 index 667c5c0f..5eb47750 100644 --- a/ReportingServicesTools/Functions/CatalogItems/Write-RsCatalogItem.ps1 +++ b/ReportingServicesTools/Functions/CatalogItems/Write-RsCatalogItem.ps1 @@ -223,7 +223,7 @@ function Write-RsCatalogItem #region Upload other stuff else { - $additionalProperties = New-Object System.Collections.Generic.List[$propertyDataType] + $additionalProperties = New-Object System.Collections.Generic.List["$propertyDataType"] $property = New-Object $propertyDataType if ($itemType -eq 'Resource') diff --git a/ReportingServicesTools/Functions/Common/ConnectionObjectRequests.ps1 b/ReportingServicesTools/Functions/Common/ConnectionObjectRequests.ps1 index 5224eb3c..89f55b38 100644 --- a/ReportingServicesTools/Functions/Common/ConnectionObjectRequests.ps1 +++ b/ReportingServicesTools/Functions/Common/ConnectionObjectRequests.ps1 @@ -43,7 +43,7 @@ { if ($goodKeys -contains $key) { - $NewRsWebServiceProxyParam[$key] = $BoundParameters[$key] + $NewRsWebServiceProxyParam["$key"] = $BoundParameters["$key"] } } @@ -96,7 +96,7 @@ function New-RsRestSessionHelper { if ($goodKeys -contains $key) { - $NewRsRestSessionParams[$key] = $BoundParameters[$key] + $NewRsRestSessionParams["$key"] = $BoundParameters["$key"] } } @@ -184,7 +184,7 @@ function New-RsConfigurationSettingObjectHelper { if ($goodKeys -contains $key) { - $NewRsConfigurationSettingObjectParam[$key] = $BoundParameters[$key] + $NewRsConfigurationSettingObjectParam["$key"] = $BoundParameters["$key"] } } diff --git a/ReportingServicesTools/ReportingServicesTools.odsm.ps1 b/ReportingServicesTools/ReportingServicesTools.odsm.ps1 new file mode 100644 index 00000000..660f69b8 --- /dev/null +++ b/ReportingServicesTools/ReportingServicesTools.odsm.ps1 @@ -0,0 +1,9 @@ +# Octopus deploy module export +$mainScript = "$PSScriptRoot\ReportingServicesTools.Designer.ps1" +@('# AUTO GENERATED SCRIPT', '# SOURCE https://github.com/microsoft/ReportingServicesTools') | sc -path $mainScript +gc "$PSScriptRoot\Libraries\library.ps1" | ac -path $mainScript -Encoding UTF8 + +$mainScript + +$scripts = Get-ChildItem "$PSScriptRoot\Functions" -Recurse -Include *.ps1 +foreach ($script in $scripts) { gc $script | ac -path $mainScript -Encoding UTF8 } \ No newline at end of file