@@ -53,10 +53,19 @@ if ($repo -ne $null) {
53
53
Register-PSRepository - Name $repoName - SourceLocation $repositoryLocation - PublishLocation $repositoryLocation / package - InstallationPolicy Trusted
54
54
}
55
55
56
+ $resourceManagerRootFolder = " $packageFolder \$buildConfig \ResourceManager\AzureResourceManager"
57
+
58
+ if ($scope -eq ' All' ) {
59
+ # Publish AzureRM.Profile first which is the common dependency
60
+ Write-Host " Publishing profile module"
61
+ Publish-Module - Path " $resourceManagerRootFolder \AzureRM.Profile" - NuGetApiKey $apiKey - Repository $repoName
62
+ Write-Host " Published profile module"
63
+ }
64
+
56
65
if (($scope -eq ' All' ) -or ($scope -eq ' ServiceManagement' )) {
57
66
$modulePath = " $packageFolder \$buildConfig \ServiceManagement\Azure"
58
67
# Publish Azure module
59
- Write-Host " Publishing Azure module from $modulePath "
68
+ Write-Host " Publishing ServiceManagement(aka Azure) module from $modulePath "
60
69
Publish-Module - Path $modulePath - NuGetApiKey $apiKey - Repository $repoName
61
70
}
62
71
@@ -75,17 +84,12 @@ if ($scope -eq 'AzureRM') {
75
84
Write-Host " Published Azure module"
76
85
}
77
86
78
- $resourceManagerRootFolder = " $packageFolder \$buildConfig \ResourceManager\AzureResourceManager"
79
87
$resourceManagerModules = Get-ChildItem - Path $resourceManagerRootFolder - Directory
80
88
if ($scope -eq ' All' ) {
81
- # Publish AzureRM.Profile first
82
- Write-Host " Publishing profile module"
83
- Publish-Module - Path " $resourceManagerRootFolder \AzureRM.Profile" - NuGetApiKey $apiKey - Repository $repoName
84
- Write-Host " Published profile module"
85
-
86
89
foreach ($module in $resourceManagerModules ) {
87
- # Make sure to filter out AzureRM.Profile
88
- if ($module -ne " AzureRM.Profile" ) {
90
+ # filter out AzureRM.Profile which always gets published first
91
+ # And "Azure.Storage" which is built out as test dependencies
92
+ if (($module.Name -ne " AzureRM.Profile" ) -and ($module.Name -ne " Azure.Storage" )) {
89
93
$modulePath = $module.FullName
90
94
Write-Host " Publishing $module module from $modulePath "
91
95
Publish-Module - Path $modulePath - NuGetApiKey $apiKey - Repository $repoName
0 commit comments