Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<AsmXUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
<AsmXUnitTests Include=".\src\ServiceManagement\Network\Commands.Network.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.dll"/>
</ItemGroup>
<ItemGroup Condition=" '$(scope)' == '' ">
<ItemGroup Condition=" '$(scope)' == 'all' ">
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
Expand All @@ -85,7 +85,7 @@
<ItemGroup Condition=" '$(scope)' == 'ServiceManagement' ">
<XUnitTests Include="@(AsmXUnitTests)"/>
</ItemGroup>
<ItemGroup Condition=" '$(scope)' !='' and '$(scope)' != 'ServiceManagement' ">
<ItemGroup Condition=" '$(scope)' != 'all' and '$(scope)' != 'ServiceManagement' and '$(scope)' != 'AzureStorage' ">
<XUnitTests Include="$(MSBuildProjectDirectory)\src\ResourceManager\$(scope)\*\bin\Debug\*.Test.dll"/>
</ItemGroup>

Expand Down
18 changes: 10 additions & 8 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
<Scope Condition=" $(Scope) == '' " >all</Scope>
</PropertyGroup>
<ItemGroup>
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == '' "/>
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln" Condition=" '$(Scope)' != '' and '$(Scope)' != 'ServiceManagement' "/>
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == 'all' "/>
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln"
Condition=" '$(Scope)' != 'all' and '$(Scope)' != 'ServiceManagement' and '$(Scope)' != 'AzureStorage' "/>
<CmdletSolutionsToBuild Include=".\src\ServiceManagement\ServiceManagement.sln"
Condition=" '$(Scope)' != '' and ('$(Scope)' == 'ServiceManagement' or '$(Scope)' == 'AzureStorage') "/>
Condition=" '$(Scope)' == 'ServiceManagement' or '$(Scope)' == 'AzureStorage' "/>
<SetupSln Include=".\setup\azurepowershell.sln" />
<SetupPowershellGetSln Include=".\setup-powershellget\powershellget.sln" />
</ItemGroup>
Expand Down Expand Up @@ -83,7 +85,7 @@
Targets="Clean"
Properties="Configuration=$(Configuration);Platform=Any CPU"
ContinueOnError="false"
Condition=" '$(Scope)' == '' "/>
Condition=" '$(Scope)' == 'all' "/>

<!-- Delete the publish files -->
<Message Importance="high" Text="Cleaning publish files..." ContinueOnError="false" />
Expand Down Expand Up @@ -165,17 +167,17 @@
Targets="Build"
Properties="Configuration=$(Configuration);Platform=Any CPU"
ContinueOnError="false"
Condition=" '$(Scope)' == '' "/>
Condition=" '$(Scope)' == 'all' "/>

<MSBuild
Projects="@(SetupSln)"
Targets="Build"
Properties="Configuration=$(Configuration);Platform=Any CPU"
ContinueOnError="false"
Condition=" '$(Scope)' == '' "/>
Condition=" '$(Scope)' == 'all' "/>

<CallTarget Targets="CodeSignInstaller"
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == ''" />
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'" />
</Target>

<!-- Do everything possible -->
Expand Down Expand Up @@ -295,7 +297,7 @@
</Target>

<!-- Publish all packages -->
<Target Name="Publish" DependsOnTargets="Build">
<Target Name="Publish">
<Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
<Message Importance="high" Text="Publishing Cmdlets..." />
<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(Scope) $(NuGetKey) \&quot;$(NuGetPublishingSource)\&quot; &quot;"/>
Expand Down
8 changes: 7 additions & 1 deletion src/ResourceManager/ApiManagement/ApiManagement.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}"
EndProject
Expand Down Expand Up @@ -32,6 +32,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Co
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Common", "..\..\ServiceManagement\Common\Commands.ServiceManagement.Common\Commands.ServiceManagement.Common.csproj", "{CFF09E81-1E31-444E-B4D4-A21E946C29E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "..\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -94,6 +96,10 @@ Global
{CFF09E81-1E31-444E-B4D4-A21E946C29E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFF09E81-1E31-444E-B4D4-A21E946C29E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFF09E81-1E31-444E-B4D4-A21E946C29E2}.Release|Any CPU.Build.0 = Release|Any CPU
{2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
27 changes: 19 additions & 8 deletions tools/PublishModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,19 @@ if ($repo -ne $null) {
Register-PSRepository -Name $repoName -SourceLocation $repositoryLocation -PublishLocation $repositoryLocation/package -InstallationPolicy Trusted
}

$resourceManagerRootFolder = "$packageFolder\$buildConfig\ResourceManager\AzureResourceManager"

if ($scope -eq 'All') {
# Publish AzureRM.Profile first which is the common dependency
Write-Host "Publishing profile module"
Publish-Module -Path "$resourceManagerRootFolder\AzureRM.Profile" -NuGetApiKey $apiKey -Repository $repoName
Write-Host "Published profile module"
}

if (($scope -eq 'All') -or ($scope -eq 'ServiceManagement')) {
$modulePath = "$packageFolder\$buildConfig\ServiceManagement\Azure"
# Publish Azure module
Write-Host "Publishing Azure module from $modulePath"
Write-Host "Publishing ServiceManagement(aka Azure) module from $modulePath"
Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName
}

Expand All @@ -75,15 +84,17 @@ if ($scope -eq 'AzureRM') {
Write-Host "Published Azure module"
}

$resourceManagerRootFolder = "$packageFolder\$buildConfig\ResourceManager\AzureResourceManager"
$resourceManagerModules = Get-ChildItem -Path $resourceManagerRootFolder -Directory
if ($scope -eq 'All') {
# Publish AzureRM modules
if ($scope -eq 'All') {
foreach ($module in $resourceManagerModules) {
$modulePath = $module.FullName
Write-Host "Publishing $module module from $modulePath"
Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName
Write-Host "Published $module module"
# filter out AzureRM.Profile which always gets published first
# And "Azure.Storage" which is built out as test dependencies
if (($module.Name -ne "AzureRM.Profile") -and ($module.Name -ne "Azure.Storage")) {
$modulePath = $module.FullName
Write-Host "Publishing $module module from $modulePath"
Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName
Write-Host "Published $module module"
}
}
} else {
$modulePath = Join-Path $resourceManagerRootFolder "AzureRM.$scope"
Expand Down