Skip to content

Commit

Permalink
Modifications to package version
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Feb 2, 2016
1 parent 11a7a7c commit 11cecc0
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,20 @@ Task("InitializeBuild")
if (BuildSystem.IsRunningOnAppVeyor)
{
var tag = AppVeyor.Environment.Repository.Tag;
var buildNumber = AppVeyor.Environment.Build.Number;

packageVersion = tag.IsTag ? tag.Name : version + "-CI-" + buildNumber + dbgSuffix;

if (tag.IsTag)
{
packageVersion = tag.Name;
}
else
{
var buildNumber = AppVeyor.Environment.Build.Number;
packageVersion = version + "-CI-" + buildNumber + dbgSuffix;
if (AppVeyor.Environment.PullRequest.IsPullRequest)
packageVersion += "-PR-" + AppVeyor.Environment.PullRequest.Number;
else
packageVersion += "-" + AppVeyor.Environment.Repository.Branch;
}

AppVeyor.UpdateBuildVersion(packageVersion);
}
Expand Down

0 comments on commit 11cecc0

Please sign in to comment.