File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ Task("Pack-Nuget")
102
102
Version = parameters . Version . NugetVersion ,
103
103
NoPackageAnalysis = true ,
104
104
OutputDirectory = parameters . Paths . Directories . NugetRoot ,
105
+ Repository = new NuGetRepository {
106
+ Branch = parameters . Version . GitVersion . BranchName ,
107
+ Commit = parameters . Version . GitVersion . Sha
108
+ } ,
105
109
Files = GetFiles ( artifactPath + "/**/*.*" )
106
110
. Select ( file => new NuSpecContent { Source = file . FullPath , Target = file . FullPath . Replace ( artifactPath , "" ) } )
107
111
. Concat (
Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ public class BuildParameters
157
157
msBuildSettings . WithProperty ( "AssemblyVersion" , version . Version ) ;
158
158
msBuildSettings . WithProperty ( "PackageVersion" , version . NugetVersion ) ;
159
159
msBuildSettings . WithProperty ( "FileVersion" , version . Version ) ;
160
+ msBuildSettings . WithProperty ( "InformationalVersion" , version . GitVersion . InformationalVersion ) ;
161
+ msBuildSettings . WithProperty ( "RepositoryBranch" , version . GitVersion . BranchName ) ;
162
+ msBuildSettings . WithProperty ( "RepositoryCommit" , version . GitVersion . Sha ) ;
160
163
msBuildSettings . WithProperty ( "NoPackageAnalysis" , "true" ) ;
161
164
}
162
165
}
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ void ValidateVersion(BuildParameters parameters)
136
136
137
137
var outputStr = string . Concat ( output ) ;
138
138
139
- Assert . Equal ( parameters . Version . SemVersion , outputStr ) ;
139
+ Assert . Equal ( parameters . Version . GitVersion . InformationalVersion , outputStr ) ;
140
140
}
141
141
142
142
void RunGitVersionOnCI ( BuildParameters parameters )
You can’t perform that action at this time.
0 commit comments