@@ -9,7 +9,7 @@ var target = Argument("target", "Default");
99var configuration = Argument ( "configuration" , "Debug" ) ;
1010var nugetOrgApiKey = EnvironmentVariable ( "NuGetOrgApiKey" ) ;
1111
12- var isAppveyor = BuildSystem . IsRunningOnAppVeyor ;
12+ var isAppVeyor = BuildSystem . IsRunningOnAppVeyor ;
1313var isTravis = BuildSystem . IsRunningOnTravisCI ;
1414
1515//////////////////////////////////////////////////////////////////////
@@ -50,7 +50,7 @@ var packages = new []
5050
5151Setup ( context =>
5252{
53- if ( isAppveyor )
53+ if ( isAppVeyor )
5454 {
5555 AppVeyor . UpdateBuildVersion ( gitVersion . FullBuildMetaData ) ;
5656 }
@@ -79,13 +79,9 @@ Task("RestorePackages")
7979
8080Task ( "UpdateAssemblyInformation" )
8181 . Description ( "Update assembly information using GitVersion" )
82+ . WithCriteria ( isAppVeyor )
8283 . Does ( ( ) =>
8384 {
84- if ( ! isAppveyor )
85- {
86- return ;
87- }
88-
8985 GitVersion ( new GitVersionSettings
9086 {
9187 UpdateAssemblyInfo = true ,
@@ -155,7 +151,7 @@ Task("Test")
155151 Exclude = IsRunningOnWindows ( ) ? null : "NuGet,NoMono" ,
156152 } ) ;
157153
158- if ( isAppveyor )
154+ if ( isAppVeyor )
159155 {
160156 AppVeyor . UploadTestResults ( resultPath , AppVeyorTestResultsType . NUnit ) ;
161157 }
@@ -199,8 +195,16 @@ Task("PublishNuGetPackages")
199195 . IsDependentOn ( "Package" )
200196 . WithCriteria ( ( ) =>
201197 {
198+ if ( ! isAppVeyor )
199+ {
200+ return false ;
201+ }
202+
202203 var branchName = gitVersion . BranchName . Trim ( ) ;
203- return branchName == "master" || branchName == "develop" ;
204+ var taggedBuild = Convert . ToBoolean ( EnvironmentVariable ( "APPVEYOR_REPO_TAG" ) ) ;
205+ var tag = EnvironmentVariable ( "APPVEYOR_REPO_TAG_NAME" ) ?? "<no tag>" ;
206+ Information ( "{0}@{1}" , branchName , tag ) ;
207+ return taggedBuild || branchName == "develop" ;
204208 } )
205209 . Does ( ( ) =>
206210 {
0 commit comments