-
Notifications
You must be signed in to change notification settings - Fork 172
/
build.proj
78 lines (74 loc) · 3.75 KB
/
build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" encoding="utf-8"?>
<!--
# Targets
/t:Clean
Removes temporary build outputs.
/t:Build
Builds assemblies.
/t:Test
Runs tests
/t:Publish
Creates local nuget packages and MSI
# Properties
/p:Scope
'Subfolder under src': An individual cmdlet module
By default, it builds everything
/p:BuildWhenEqual='$False'
Execute Build when Microsoft.Graph.Authentication in PSGallery and local version are the same
/p:EnableSigning='$False'
Enable Delayed Code Signing
/p:SkipVersionCheck='$False'
Skip Version Checks for Beta modules
/p:UpdateAutoRest=='$True'
-->
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)Repo.props" />
<PropertyGroup>
<SkipVersionCheck Condition ="'$(SkipVersionCheck)' == ''">$False</SkipVersionCheck>
<BuildWhenEqual Condition ="'$(BuildWhenEqual)' == ''">$False</BuildWhenEqual>
<EnableSigning Condition ="'$(EnableSigning)' == ''">$False</EnableSigning>
<UpdateAutoRest Condition ="'$(UpdateAutoRest)' == ''">$True</UpdateAutoRest>
<!-- PS command related -->
<PowerShellCoreCommandPrefix>pwsh -NonInteractive -NoLogo -NoProfile -Command</PowerShellCoreCommandPrefix>
<GenerateModules> $(PowerShellCoreCommandPrefix) " $(RepoTools)/GenerateModules.ps1 -Build -Test -SkipVersionCheck:$(SkipVersionCheck) -EnableSigning:$(EnableSigning) -UpdateAutoRest:$(UpdateAutoRest) " </GenerateModules>
<GenerateRollup> $(PowerShellCoreCommandPrefix) " $(RepoTools)/GenerateRollUpModule.ps1 " </GenerateRollup>
<GenerateAuth> $(PowerShellCoreCommandPrefix) " $(RepoTools)/GenerateAuthenticationModule.ps1 -Build -BuildWhenEqual:$(BuildWhenEqual) -EnableSigning:$(EnableSigning) " </GenerateAuth>
<GenerateProfiles> $(PowerShellCoreCommandPrefix) " $(RepoTools)/GenerateProfiles.ps1 " </GenerateProfiles>
<PackAuth> $(PowerShellCoreCommandPrefix) " $(RepoTools)/PackModule.ps1 -Module 'Authentication' -ArtifactsLocation '.\tools\artifacts' " </PackAuth>
<PackBetaModules> $(PowerShellCoreCommandPrefix) " $(RepoTools)/PackBetaModules.ps1 -WorkingDirectory '$(RepoArtifacts)' -ArtifactsLocation '$(ArtifactsLocation)' " </PackBetaModules>
</PropertyGroup>
<Target Name="Clean">
</Target>
<!-- Build all flavors of the Cmdlets -->
<Target Name="GenerateProfiles">
<Message Importance="high" Text="Generating Profiles..." />
<Message Importance="high" Text="$(GenerateProfiles)"/>
<Exec Command="$(GenerateProfiles)" ></Exec>
</Target>
<Target Name="GenerateAuth">
<Message Importance="high" Text="Generating Auth Module..." />
<Message Importance="high" Text="$(GenerateAuth)"/>
<Exec Command="$(GenerateAuth)" ></Exec>
</Target>
<Target Name="PackAuth">
<Message Importance="high" Text="Packing Modules..." />
<Message Importance="high" Text="$(PackAuth)"/>
<Exec Command="$(PackAuth)"/>
</Target>
<Target Name="GenerateModules">
<Message Importance="high" Text="Generating Modules..." />
<Message Importance="high" Text="$(GenerateModules)"/>
<Exec Command="$(GenerateModules)" ></Exec>
</Target>
<Target Name="PackBetaModules">
<Message Importance="high" Text="Packing Modules..." />
<Message Importance="high" Text="$(PackBetaModules)"/>
<Exec Command="$(PackBetaModules)"/>
</Target>
<Target Name="GenerateRollup">
<Message Importance="high" Text="Generating Roll-Up Module..." />
<Message Importance="high" Text="$(GenerateRollup)"/>
<Exec Command="$(GenerateRollup)" ></Exec>
</Target>
<Target Name="Full" DependsOnTargets="GenerateProfiles;GenerateAuth;PackAuth;GenerateModules;GenerateRollup;PackAuth;" />
</Project>