Skip to content

Commit 2f4f9e6

Browse files
jennyf19jmprieur
andauthored
updates for one build (#2777)
* updates for one build * Delete build/version.props * Move the version to version.projs a it's also included by tests (#2784) * update other ymls to use MicrosoftIdentityModelVersion * Re-adding version.props to the solution --------- Co-authored-by: Jean-Marc Prieur <[email protected]>
1 parent a120bde commit 2f4f9e6

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

build/common.props

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<Import Project="dependencies.props" />
44
<Import Project="targets.props" />
5+
<Import Project="version.props" />
56

67
<PropertyGroup>
78
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
@@ -31,20 +32,6 @@
3132
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
3233
</PropertyGroup>
3334

34-
<!-- Wilson version -->
35-
<PropertyGroup>
36-
<WilsonCurrentVersion>8.0.0</WilsonCurrentVersion>
37-
38-
<PreviewVersionSuffix Condition="'$(PreviewVersionSuffix)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">preview-$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMddHHmmss"))</PreviewVersionSuffix>
39-
<!--VS re-evaluates the variables, so having seconds or minutes creates an infinite loop of package updates-->
40-
<PreviewVersionSuffix Condition="'$(PreviewVersionSuffix)' == '' and '$(BuildingInsideVisualStudio)' == 'true'">preview-$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMddHH"))</PreviewVersionSuffix>
41-
<IsCustomPreview>$(WilsonVersion.Contains("-"))</IsCustomPreview>
42-
<Version Condition="'$(WilsonVersion)' != ''">$(WilsonVersion)</Version>
43-
<VersionSuffix Condition="'$(WilsonVersion)' == ''">$(PreviewVersionSuffix)</VersionSuffix>
44-
<VersionPrefix Condition="'$(WilsonVersion)' == ''">$(WilsonCurrentVersion)</VersionPrefix>
45-
<FileVersion Condition="'$(WilsonVersion)' != '' and '$(IsCustomPreview)' != 'true' ">$(WilsonVersion).$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMdd"))</FileVersion>
46-
<FileVersion Condition="'$(WilsonVersion)' == ''">$(WilsonCurrentVersion).$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMdd"))</FileVersion>
47-
</PropertyGroup>
4835

4936
<PropertyGroup>
5037
<EnablePackageValidation>false</EnablePackageValidation>

build/releaseBuild.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ schedules:
1313

1414
# The following variables are set in the release build UI:
1515
# BuildConfiguration: 'debug|release'
16-
# WilsonVersion: ''. Full version number
16+
# MicrosoftIdentityModelVersion: ''. Full version number
1717
# BuildPlatform: 'any cpu'
1818

1919
jobs:
@@ -28,4 +28,4 @@ jobs:
2828

2929
steps:
3030

31-
- template: template-Build-run-tests-sign.yml
31+
- template: template-Build-run-tests-sign.yml

build/template-Build-run-tests-sign.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ steps:
44
- script: echo $(BuildConfiguration)
55
displayName: 'display Build Configuration'
66

7-
- script: echo $(WilsonVersion)
8-
displayName: 'display WilsonVersion'
7+
- script: echo $(MicrosoftIdentityModelVersion)
8+
displayName: 'display MicrosoftIdentityModelVersion'
99

1010
- task: UseDotNet@2
1111
displayName: 'Use .NET Core sdk 2.x'
@@ -187,7 +187,7 @@ steps:
187187

188188
- task: NuGetCommand@2
189189
displayName: 'Upload NuGet Package to VSTS NuGet'
190-
condition: eq(variables['WilsonVersion'], '')
190+
condition: eq(variables['MicrosoftIdentityModelVersion'], '')
191191
inputs:
192192
command: push
193193
packagesToPush: '$(Build.Repository.LocalPath)\artifacts\*.nupkg'

build/version.props

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<!-- This file may be overwritten by automation. Only values allowed here are VersionPrefix and VersionSuffix. -->
22
<Project>
3-
<PropertyGroup>
4-
<VersionPrefix>0.0.1</VersionPrefix>
5-
<VersionSuffix>preview</VersionSuffix>
6-
</PropertyGroup>
3+
<!-- Wilson version -->
4+
<PropertyGroup>
5+
<MicrosoftIdentityModelCurrentVersion>8.0.1</MicrosoftIdentityModelCurrentVersion>
76

8-
<!--Enables to create preview NuGet packages.-->
9-
<PropertyGroup Condition=" '$(VersionSuffix)' == '' ">
10-
<Version>$(VersionPrefix)</Version>
11-
</PropertyGroup>
12-
13-
<PropertyGroup Condition=" '$(VersionSuffix)' != '' ">
14-
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
15-
</PropertyGroup>
16-
17-
</Project>
7+
<PreviewVersionSuffix Condition="'$(PreviewVersionSuffix)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">preview-$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMddHHmmss"))</PreviewVersionSuffix>
8+
<!--VS re-evaluates the variables, so having seconds or minutes creates an infinite loop of package updates-->
9+
<PreviewVersionSuffix Condition="'$(PreviewVersionSuffix)' == '' and '$(BuildingInsideVisualStudio)' == 'true'">preview-$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMddHH"))</PreviewVersionSuffix>
10+
<IsCustomPreview>$(MicrosoftIdentityModelVersion.Contains("-"))</IsCustomPreview>
11+
<Version Condition="'$(MicrosoftIdentityModelVersion)' != ''">$(MicrosoftIdentityModelVersion)</Version>
12+
<VersionSuffix Condition="'$(MicrosoftIdentityModelVersion)' == ''">$(PreviewVersionSuffix)</VersionSuffix>
13+
<VersionPrefix Condition="'$(MicrosoftIdentityModelVersion)' == ''">$(MicrosoftIdentityModelCurrentVersion)</VersionPrefix>
14+
<FileVersion Condition="'$(MicrosoftIdentityModelVersion)' != '' and '$(IsCustomPreview)' != 'true' ">$(MicrosoftIdentityModelVersion).$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMdd"))</FileVersion>
15+
<FileVersion Condition="'$(MicrosoftIdentityModelVersion)' == ''">$(MicrosoftIdentityModelCurrentVersion).$([System.DateTime]::Now.AddYears(-2019).Year)$([System.DateTime]::Now.ToString("MMdd"))</FileVersion>
16+
</PropertyGroup>
17+
</Project>

0 commit comments

Comments
 (0)