File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ extends:
64
64
inputs :
65
65
command : restore
66
66
projects : ' **/*.csproj'
67
+ - task : PowerShell@2
68
+ displayName : ' Validate updated version'
69
+ condition : and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
70
+ inputs :
71
+ targetType : filePath
72
+ filePath : ' $(Build.SourcesDirectory)\scripts\ValidateUpdatedNugetVersion.ps1'
73
+ arguments : ' -packageName "Microsoft.Graph.Beta" -projectPath "$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj"'
74
+ pwsh : true
75
+ enabled : true
67
76
- powershell : |
68
77
# This allows us to not have to checkin .csproj files with DelaySign and SignAssembly set to to true. If the flag is set,
69
78
# then project is not debuggable with SignAssembly set to true.
@@ -110,15 +119,6 @@ extends:
110
119
inputs :
111
120
command : ' test'
112
121
arguments : ' --configuration $(BuildConfiguration) --no-build --verbosity normal'
113
- - task : PowerShell@2
114
- displayName : ' Validate updated version'
115
- condition : and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
116
- inputs :
117
- targetType : filePath
118
- filePath : ' $(Build.SourcesDirectory)\scripts\ValidateUpdatedNugetVersion.ps1'
119
- arguments : ' -packageName "Microsoft.Graph.Beta" -projectPath "$(Build.SourcesDirectory)\src\Microsoft.Graph\Microsoft.Graph.Beta.csproj"'
120
- pwsh : true
121
- enabled : true
122
122
- task : EsrpCodeSigning@5
123
123
displayName : ' ESRP DLL Strong Name (Microsoft.Graph.Beta)'
124
124
inputs :
Original file line number Diff line number Diff line change @@ -28,15 +28,11 @@ Param(
28
28
29
29
[xml ]$xmlDoc = Get-Content $projectPath
30
30
31
- # Assumption: VersionPrefix is set in the first property group.
32
- $versionPrefixString = $xmlDoc.Project.PropertyGroup [0 ].VersionPrefix
33
- if ($xmlDoc.Project.PropertyGroup [0 ].VersionSuffix){
34
- $versionPrefixString = $versionPrefixString + " -" + $xmlDoc.Project.PropertyGroup [0 ].VersionSuffix
35
- }
36
-
31
+ # Assumption: Version is set in the first property group.
32
+ $versionString = $xmlDoc.Project.PropertyGroup [0 ].Version
37
33
38
34
# System.Version, get the version prefix.
39
- $currentProjectVersion = [System.Management.Automation.SemanticVersion ]" $versionPrefixString "
35
+ $currentProjectVersion = [System.Management.Automation.SemanticVersion ]" $versionString "
40
36
41
37
# API is case-sensitive
42
38
$packageName = $packageName.ToLower ()
You can’t perform that action at this time.
0 commit comments