Skip to content

Commit d91b200

Browse files
author
Samuel Anudeep
committed
Merge pull request #160 from Azure/dev
RI from upstream/dev into origin/release
2 parents 53bbda8 + 898f889 commit d91b200

File tree

155 files changed

+31755
-4398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+31755
-4398
lines changed

AzurePowershell.Test.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<AsmXUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
6363
<AsmXUnitTests Include=".\src\ServiceManagement\Network\Commands.Network.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.dll"/>
6464
</ItemGroup>
65-
<ItemGroup Condition=" '$(scope)' == '' ">
65+
<ItemGroup Condition=" '$(scope)' == 'all' ">
6666
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
6767
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
6868
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
@@ -85,7 +85,7 @@
8585
<ItemGroup Condition=" '$(scope)' == 'ServiceManagement' ">
8686
<XUnitTests Include="@(AsmXUnitTests)"/>
8787
</ItemGroup>
88-
<ItemGroup Condition=" '$(scope)' !='' and '$(scope)' != 'ServiceManagement' ">
88+
<ItemGroup Condition=" '$(scope)' != 'all' and '$(scope)' != 'ServiceManagement' and '$(scope)' != 'AzureStorage' ">
8989
<XUnitTests Include="$(MSBuildProjectDirectory)\src\ResourceManager\$(scope)\*\bin\Debug\*.Test.dll"/>
9090
</ItemGroup>
9191
</Target>

build.proj

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Test the code sign workflow locally.
2121
2222
/p:Scope
23-
'Azure': service management
23+
'ServiceManagement': service management
2424
'AzureStorage': storage data plane cmdlets
2525
'Subfolder under src\ResourceManager': An individual cmdlet module
2626
By default, it builds all
@@ -42,12 +42,14 @@
4242
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
4343
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
4444
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
45+
<Scope Condition=" $(Scope) == '' " >all</Scope>
4546
</PropertyGroup>
4647
<ItemGroup>
47-
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == '' "/>
48-
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln" Condition=" '$(Scope)' != '' and '$(Scope)' != 'ServiceManagement' "/>
48+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == 'all' "/>
49+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln"
50+
Condition=" '$(Scope)' != 'all' and '$(Scope)' != 'ServiceManagement' and '$(Scope)' != 'AzureStorage' "/>
4951
<CmdletSolutionsToBuild Include=".\src\ServiceManagement\ServiceManagement.sln"
50-
Condition=" '$(Scope)' != '' and ('$(Scope)' == 'ServiceManagement' or '$(Scope)' == 'AzureStorage') "/>
52+
Condition=" '$(Scope)' == 'ServiceManagement' or '$(Scope)' == 'AzureStorage' "/>
5153
<SetupSln Include=".\setup\azurepowershell.sln" />
5254
<SetupPowershellGetSln Include=".\setup-powershellget\powershellget.sln" />
5355
</ItemGroup>
@@ -83,7 +85,7 @@
8385
Targets="Clean"
8486
Properties="Configuration=$(Configuration);Platform=Any CPU"
8587
ContinueOnError="false"
86-
Condition=" '$(Scope)' == '' "/>
88+
Condition=" '$(Scope)' == 'all' "/>
8789

8890
<!-- Delete the publish files -->
8991
<Message Importance="high" Text="Cleaning publish files..." ContinueOnError="false" />
@@ -165,17 +167,17 @@
165167
Targets="Build"
166168
Properties="Configuration=$(Configuration);Platform=Any CPU"
167169
ContinueOnError="false"
168-
Condition=" '$(Scope)' == '' "/>
170+
Condition=" '$(Scope)' == 'all' "/>
169171

170172
<MSBuild
171173
Projects="@(SetupSln)"
172174
Targets="Build"
173175
Properties="Configuration=$(Configuration);Platform=Any CPU"
174176
ContinueOnError="false"
175-
Condition=" '$(Scope)' == '' "/>
177+
Condition=" '$(Scope)' == 'all' "/>
176178

177179
<CallTarget Targets="CodeSignInstaller"
178-
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == ''" />
180+
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'" />
179181
</Target>
180182

181183
<!-- Do everything possible -->
@@ -295,7 +297,7 @@
295297
</Target>
296298

297299
<!-- Publish all packages -->
298-
<Target Name="Publish" DependsOnTargets="Build">
300+
<Target Name="Publish">
299301
<Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
300302
<Message Importance="high" Text="Publishing Cmdlets..." />
301303
<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(Scope) $(NuGetKey) \&quot;$(NuGetPublishingSource)\&quot; &quot;"/>

setup-powershellget/Setup/ShortcutStartup.ps1

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,25 @@ Param(
1717
[switch]$Install
1818
)
1919

20+
function EnsureRegistryPath
21+
{
22+
$originalpaths = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PSModulePath).PSModulePath
23+
if($originalpaths.Contains("$env:ProgramFiles\WindowsPowerShell\Modules") -eq $false)
24+
{
25+
Write-Output "Fixing PSModulePath"
26+
$newPath = "$originalpaths;$env:ProgramFiles\WindowsPowerShell\Modules"
27+
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PSModulePath –Value $newPath
28+
}
29+
else
30+
{
31+
Write-Output "PSModulePath successfuly validated"
32+
}
33+
}
34+
2035
$error.clear()
2136
try {
2237
if ($Install.IsPresent) {
38+
EnsureRegistryPath
2339
Write-Output @"
2440
2541
Finalizing installation of Azure PowerShell.
@@ -57,4 +73,5 @@ Write-Output "An error occured during installation."
5773
Write-Output $error
5874
Write-Output "Press any key..."
5975
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
60-
}
76+
}
77+

0 commit comments

Comments
 (0)