File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<ItemGroup >
3
- <PackageReference Include =" GitInfo" Version =" 2.0.26 " PrivateAssets =" All" />
4
- <PackageReference Include =" MSBuilder.GenerateAssemblyInfo" Version =" 0.2.1 " PrivateAssets =" All" />
3
+ <PackageReference Include =" GitInfo" Version =" 2.1.2 " PrivateAssets =" All" />
4
+ <PackageReference Include =" MSBuilder.GenerateAssemblyInfo" Version =" 0.2.2 " PrivateAssets =" All" />
5
5
</ItemGroup >
6
6
</Project >
Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<PropertyGroup >
3
3
<NightlyTag >nightly</NightlyTag >
4
- <RegexPre >pre\d</ RegexPre >
4
+ <RegexTag >[a-z]+\.[0-9]</ RegexTag >
5
5
</PropertyGroup >
6
6
<PropertyGroup >
7
7
<GitBranch Condition =" '$(SYSTEM_PULLREQUEST_TARGETBRANCH)' != ''" >$(SYSTEM_PULLREQUEST_TARGETBRANCH)</GitBranch >
33
33
GitVersion;
34
34
$(SetVersionsDependsOn);
35
35
</SetVersionsDependsOn >
36
+ <SetGitInfoPropsBefore >
37
+ GitInfo;
38
+ GitVersion;
39
+ </SetGitInfoPropsBefore >
36
40
</PropertyGroup >
37
41
42
+ <Target Name =" SetGitInfoProps" BeforeTargets =" $(SetGitInfoPropsBefore)" >
43
+ <PropertyGroup >
44
+ <GitDefaultBranch >main</GitDefaultBranch >
45
+ <GitIgnoreBranchVersion >true</GitIgnoreBranchVersion >
46
+ <GitIgnoreTagVersion >true</GitIgnoreTagVersion >
47
+ </PropertyGroup >
48
+ </Target >
38
49
<Target Name =" SetVersions" BeforeTargets =" $(SetVersionsBefore)" DependsOnTargets =" $(SetVersionsDependsOn)" Returns =" $(Version)" >
39
50
<PropertyGroup >
51
+ <SemVerLabel >$([System.Text.RegularExpressions.Regex]::Match($(GitTag), $(RegexTag)))</SemVerLabel >
52
+ <GitDefaultBranch >main</GitDefaultBranch >
53
+ <GitIgnoreBranchVersion >true</GitIgnoreBranchVersion >
54
+ <GitIgnoreTagVersion >true</GitIgnoreTagVersion >
55
+ <GitSemVerLabel Condition =" '$(GitTag)' != '' and $([System.Text.RegularExpressions.Regex]::IsMatch('$(GitTag)', $(RegexTag))) " >$(SemVerLabel)</GitSemVerLabel >
40
56
<GitSemVerLabel Condition =" $(CI) and '$(BUILD_REASON)' == 'Schedule'" >$(NightlyTag)</GitSemVerLabel >
41
57
<GitSemVerDashLabel Condition =" '$(GitSemVerLabel)' != ''" >-$(GitSemVerLabel)</GitSemVerDashLabel >
42
58
</PropertyGroup >
You can’t perform that action at this time.
0 commit comments