Skip to content

Commit deceb14

Browse files
committed
Testing Netcore scope.
1 parent fdd4322 commit deceb14

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

build.proj

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
54
<!--
65
Available Targets:
76
@@ -68,7 +67,7 @@
6867
</PropertyGroup>
6968

7069
<PropertyGroup Condition="$(NetCore) == 'true' ">
71-
<Scope>NetCore</Scope>
70+
<Scope>Netcore</Scope>
7271
</PropertyGroup>
7372

7473
<!-- Set Skips -->
@@ -85,7 +84,6 @@
8584
<SkipDependencyAnalysis>true</SkipDependencyAnalysis>
8685
</PropertyGroup>
8786

88-
8987
<ItemGroup>
9088
<LocalBuildTasks Include="$(LibraryToolsFolder)\RepoTasks\RepoTasks.sln" Condition="'$(NetCore)' == 'false'" />
9189
<StackSolution Include="$(LibrarySourceFolder)\StackAdmin\Stack.sln" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Stack'" />
@@ -112,9 +110,9 @@
112110
<![CDATA[System.Environment.SetEnvironmentVariable(EnvName, EnvValue);]]>
113111
</Code>
114112
</Task>
115-
</UsingTask> <!--
116-
CI build related
117-
-->
113+
</UsingTask>
114+
115+
<!-- CI build related -->
118116
<PropertyGroup>
119117
<!--OnPremiseBuildTasks is not a good name, but CI server is using that, will update across soon-->
120118
<CIToolsPath>$(OnPremiseBuildTasks)</CIToolsPath>
@@ -298,14 +296,15 @@
298296
Condition="('$(Scope)' == 'All' or '$(Scope)' == 'Latest') and $(CodeSign) == 'true'" />
299297
</Target>
300298

301-
302-
303299
<!--
304300
Build .Net Core Cmdlets
305301
Fully self contained
306302
-->
307303
<Target Name="BuildNetCore">
308304
<Message Importance="high" Text="Building Cmdlets..." />
305+
<PropertyGroup>
306+
<Scope>Netcore</Scope>
307+
</PropertyGroup>
309308

310309
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;$ProgressPreference = 'SilentlyContinue';. $(LibraryToolsFolder)\CreateAliasMapping.ps1 &quot;"/>
311310

@@ -356,7 +355,7 @@
356355
<Delete Files="@(ExtraPsdFiles->'%(FullPath)')"/>
357356

358357
<!-- Update module manifests. -->
359-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 -BuildConfig $(Configuration) -Scope Netcore &quot; "
358+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 -BuildConfig $(Configuration) -Scope $(Scope) &quot; "
360359
Condition="'$(CodeSign)' == 'false'"
361360
ContinueOnError="false" />
362361
<!-- Generate the Help -->
@@ -370,11 +369,9 @@
370369
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(LibraryToolsFolder)\CleanupBuild.ps1 -BuildConfig $(Configuration) &quot;" />
371370
</Target>
372371

373-
374372
<!-- Do everything possible except Publish -->
375373
<Target Name="Full" DependsOnTargets="Clean;Build;Test" />
376374

377-
378375
<Target Name="BuildMsBuildTask" DependsOnTargets="RestoreNugetPackages">
379376
<Message Importance="high" Text="Building RepoTasks" />
380377
<MSBuild Projects="@(LocalBuildTasks)"
@@ -440,7 +437,7 @@
440437

441438
<!-- Copying shortcut to be signed -->
442439
<Copy SourceFiles="$(LibraryRoot)tools\Az\Az.psm1"
443-
DestinationFolder="$(PackageDirectory)\$(Configuration)" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Netcore'" />
440+
DestinationFolder="$(PackageDirectory)\$(Configuration)" Condition="'$(Scope)' == 'Netcore'" />
444441
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
445442
DestinationFolder="$(PackageDirectory)\$(Configuration)" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest'" />
446443
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureRM\AzureRM.psm1"
@@ -485,7 +482,7 @@
485482

486483
<!-- Copy files back after signing -->
487484
<Copy SourceFiles="$(PackageDirectory)\$(Configuration)\Az.psm1"
488-
DestinationFolder="$(LibraryRoot)tools\Az" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Netcore'" />
485+
DestinationFolder="$(LibraryRoot)tools\Az" Condition="'$(Scope)' == 'Netcore'" />
489486
<Copy SourceFiles="$(PackageDirectory)\$(Configuration)\AzureRM.psm1"
490487
DestinationFolder="$(LibraryRoot)tools\AzureRM" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest'" />
491488
<Copy SourceFiles="$(StackPackageFolder)\$(Configuration)\AzureRM.psm1"
@@ -494,17 +491,13 @@
494491
DestinationFolder="$(LibrarySourceFolder)\StackAdmin\AzureStack" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Stack'" />
495492
</Target>
496493

497-
498-
499494
<Target Name="BuildInstaller" Condition="'$(Scope)' == 'All' or '$(Scope)' == 'Latest'">
500495
<Exec Command="$(PowerShellCommandPrefix) &quot;. Register-PSRepository -Name MSIcreationrepository -SourceLocation $(PackageDirectory) -InstallationPolicy Trusted &quot; "/>
501496
<Exec Command="$(PowerShellCommandPrefix) &quot;. $(LibraryRoot)\setup\generate.ps1 -repository MSIcreationrepository &quot; "/>
502497
<Exec Command="$(PowerShellCommandPrefix) &quot;. Unregister-PSRepository -Name MSIcreationrepository &quot; "/>
503498
<CallTarget Targets="CodeSignInstaller" Condition=" '$(CodeSign)' == 'true'" />
504499
</Target>
505500

506-
507-
508501
<Target Name="CodeSignInstaller">
509502
<PropertyGroup>
510503
<!--public token associated with MSSharedLibKey.snk-->
@@ -536,8 +529,6 @@
536529
<SetEnvVar EnvName="SignedMsiDir" EnvValue="$(SignedOutputRootDir)" />
537530
</Target>
538531

539-
540-
541532
<!-- Run Validation -->
542533
<Target Name="DependencyAnalysis"
543534
Condition="'$(SkipDependencyAnalysis)' == 'false'">
@@ -562,8 +553,7 @@
562553
<OnError ExecuteTargets="StaticAnalysisErrorMessage"/>
563554
</Target>
564555

565-
566-
<Target Name="StaticAnalysisErrorMessage">
556+
<Target Name="StaticAnalysisErrorMessage">
567557
<Error Text="StaticAnalysis has failed. Please follow the instructions on this doc: https://github.com/Azure/azure-powershell/blob/preview/documentation/Debugging-StaticAnalysis-Errors.md"/>
568558
</Target>
569559

@@ -593,7 +583,7 @@
593583
ContinueOnError="false"/>
594584

595585
<CallTarget Targets="BuildInstaller" Condition="'$(Scope)' =='All'" />
596-
</Target>
586+
</Target>
597587

598588
<PropertyGroup>
599589
<RunTestLive Condition="'$(RunTestLive)' == ''">false</RunTestLive>
@@ -653,10 +643,7 @@
653643
DependsOnTargets="Clean;Build;Test;RunOneSDKCIT" />
654644

655645
<!-- Run live tests and record mocks -->
656-
<Target
657-
Name="RunLiveTests"
658-
DependsOnTargets="Clean;Build;LiveTestsFilter" />
659-
646+
<Target Name="RunLiveTests" DependsOnTargets="Clean;Build;LiveTestsFilter" />
660647

661648
<Target Name="LiveTestsFilter" DependsOnTargets="Build;BeforeRunTests">
662649
<Message Importance="high" Text="Running live tests..." />

0 commit comments

Comments
 (0)