diff --git a/build.proj b/build.proj
index f5445033cff9..b3aecfbbdfda 100644
--- a/build.proj
+++ b/build.proj
@@ -18,7 +18,12 @@
/p:CodeSign=True;DelaySign=True
Test the code sign workflow locally.
-
+
+ /p:Scope
+ 'Azure': service management
+ 'AzureStorage': storage data plane cmdlets
+ 'Subfolder under src\ResourceManager': An individual cmdlet module
+ By default, it builds all
-->
@@ -41,7 +46,8 @@
-
+
@@ -292,8 +298,7 @@
-
-
+
diff --git a/tools/PublishModules.ps1 b/tools/PublishModules.ps1
index bd21b1daf213..9f8ba4ac00c8 100644
--- a/tools/PublishModules.ps1
+++ b/tools/PublishModules.ps1
@@ -38,7 +38,7 @@ if ([string]::IsNullOrEmpty($repositoryLocation))
if ([string]::IsNullOrEmpty($scope))
{
Write-Verbose "Default scope to all"
- $scope = 'all'
+ $scope = 'All'
}
Write-Host "Publishing $scope package(s)"
@@ -53,13 +53,20 @@ if ($repo -ne $null) {
Register-PSRepository -Name $repoName -SourceLocation $repositoryLocation -PublishLocation $repositoryLocation/package -InstallationPolicy Trusted
}
-if (($scope -eq 'all') -or ($scope -eq 'servicemanagement')) {
+if (($scope -eq 'All') -or ($scope -eq 'ServiceManagement')) {
$modulePath = "$packageFolder\$buildConfig\ServiceManagement\Azure"
# Publish Azure module
Write-Host "Publishing Azure module from $modulePath"
Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName
}
+if (($scope -eq 'All') -or ($scope -eq 'AzureStorage')) {
+ $modulePath = "$packageFolder\$buildConfig\ServiceManagement\Azure\Azure.Storage"
+ # Publish AzureStorage module
+ Write-Host "Publishing AzureStorage module from $modulePath"
+ Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName
+}
+
if ($scope -eq 'AzureRM') {
# Publish AzureRM module
$modulePath = "$PSScriptRoot\AzureRM"
@@ -70,7 +77,7 @@ if ($scope -eq 'AzureRM') {
$resourceManagerRootFolder = "$packageFolder\$buildConfig\ResourceManager\AzureResourceManager"
$resourceManagerModules = Get-ChildItem -Path $resourceManagerRootFolder -Directory
-if ($scope -eq 'all') {
+if ($scope -eq 'All') {
# Publish AzureRM modules
foreach ($module in $resourceManagerModules) {
$modulePath = $module.FullName