@@ -50,7 +50,7 @@ function Create-ModulePsm1
50
50
elseif ($mod [" RequiredVersion" ])
51
51
{
52
52
$importedModules += " Import-Module " + $mod [" ModuleName" ] + " -RequiredVersion " + $mod [" RequiredVersion" ] + " `r`n "
53
- }
53
+ }
54
54
}
55
55
}
56
56
@@ -69,7 +69,7 @@ function Create-ModulePsm1
69
69
70
70
$contructedCommands = Find-DefaultResourceGroupCmdlets - AddDefaultParameters $AddDefaultParameters - ModuleMetadata $ModuleMetadata - ModulePath $ModulePath
71
71
$template = $template -replace " %COMMANDS%" , $contructedCommands
72
-
72
+
73
73
Write-Host " Writing psm1 manifest to $templateOutputPath "
74
74
$template | Out-File - FilePath $templateOutputPath - Force
75
75
$file = Get-Item - Path $templateOutputPath
@@ -86,7 +86,7 @@ function Find-DefaultResourceGroupCmdlets
86
86
)
87
87
PROCESS
88
88
{
89
- if ($AddDefaultParameters )
89
+ if ($AddDefaultParameters )
90
90
{
91
91
$nestedModules = $ModuleMetadata.NestedModules
92
92
$AllCmdlets = @ ()
@@ -96,9 +96,9 @@ function Find-DefaultResourceGroupCmdlets
96
96
$dllCmdlets = $Assembly.GetTypes () | Where-Object {$_.CustomAttributes.AttributeType.Name -contains " CmdletAttribute" }
97
97
$AllCmdlets += $dllCmdlets
98
98
}
99
-
99
+
100
100
$FilteredCommands = $AllCmdlets | Where-Object {Test-CmdletRequiredParameter - Cmdlet $_ - Parameter " ResourceGroupName" }
101
-
101
+
102
102
if ($FilteredCommands.Length -eq 0 ) {
103
103
$contructedCommands = " @()"
104
104
}
@@ -109,7 +109,7 @@ function Find-DefaultResourceGroupCmdlets
109
109
}
110
110
$contructedCommands = $contructedCommands -replace " .$" , " )"
111
111
}
112
-
112
+
113
113
return $contructedCommands
114
114
}
115
115
@@ -144,7 +144,7 @@ function Test-CmdletRequiredParameter
144
144
return $true
145
145
}
146
146
}
147
-
147
+
148
148
return $false
149
149
}
150
150
}
@@ -180,10 +180,10 @@ if ([string]::IsNullOrEmpty($buildConfig))
180
180
if ([string ]::IsNullOrEmpty($scope ))
181
181
{
182
182
Write-Verbose " Default scope to all"
183
- $scope = ' All'
183
+ $scope = ' All'
184
184
}
185
185
186
- Write-Host " Updating $scope package(and its dependencies)"
186
+ Write-Host " Updating $scope package(and its dependencies)"
187
187
188
188
$packageFolder = " $PSScriptRoot \..\src\Package"
189
189
@@ -209,21 +209,21 @@ if (($scope -eq 'All') -or ($scope -eq 'AzureStorage')) {
209
209
# Publish AzureStorage module
210
210
Write-Host " Updating AzureStorage module from $modulePath "
211
211
Create- ModulePsm1 - ModulePath $modulePath - TemplatePath $templateLocation $false
212
- }
212
+ }
213
213
214
214
if (($scope -eq ' All' ) -or ($scope -eq ' ServiceManagement' )) {
215
215
$modulePath = " $packageFolder \$buildConfig \ServiceManagement\Azure"
216
216
# Publish Azure module
217
217
Write-Host " Updating ServiceManagement(aka Azure) module from $modulePath "
218
218
Create- ModulePsm1 - ModulePath $modulePath - TemplatePath $templateLocation $false
219
- }
219
+ }
220
220
221
221
$resourceManagerModules = Get-ChildItem - Path $resourceManagerRootFolder - Directory
222
- if ($scope -eq ' All' ) {
222
+ if ($scope -eq ' All' ) {
223
223
foreach ($module in $resourceManagerModules ) {
224
- # filter out AzureRM.Profile which always gets published first
225
- # And "Azure.Storage" which is built out as test dependencies
226
- if (($module.Name -ne " AzureRM.Profile" ) -and ($module.Name -ne " Azure.Storage" ) -and ( ! $module .Name.Contains ( " Experiment " )) ) {
224
+ # filter out AzureRM.Profile which always gets published first
225
+ # And "Azure.Storage" which is built out as test dependencies
226
+ if (($module.Name -ne " AzureRM.Profile" ) -and ($module.Name -ne " Azure.Storage" )) {
227
227
$modulePath = $module.FullName
228
228
Write-Host " Updating $module module from $modulePath "
229
229
Create- ModulePsm1 - ModulePath $modulePath - TemplatePath $templateLocation $true
@@ -235,14 +235,14 @@ if ($scope -eq 'All') {
235
235
if (Test-Path $modulePath ) {
236
236
Write-Host " Updating $scope module from $modulePath "
237
237
Create- ModulePsm1 - ModulePath $modulePath - TemplatePath $templateLocation $false
238
- Write-Host " Updated $scope module"
238
+ Write-Host " Updated $scope module"
239
239
} else {
240
240
Write-Error " Can not find module with name $scope to publish"
241
241
}
242
242
}
243
243
244
244
if (($scope -eq ' All' ) -or ($scope -eq ' AzureRM' )) {
245
- # Update AzureRM module
245
+ # Update AzureRM module
246
246
if ($Profile -eq " Stack" )
247
247
{
248
248
$modulePath = " $PSScriptRoot \..\src\StackAdmin\AzureRM"
@@ -260,5 +260,5 @@ if (($scope -eq 'All') -or ($scope -eq 'AzureRM')) {
260
260
Create- ModulePsm1 - ModulePath $modulePath - TemplatePath $templateLocation $false
261
261
Write-Host " Updated Azure module"
262
262
}
263
- }
263
+ }
264
264
0 commit comments