Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
only package release without build number if building tag
Browse files Browse the repository at this point in the history
  • Loading branch information
alhardy committed Feb 6, 2018
1 parent 843605e commit 0b1e526
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ var coverWith = HasArgument("CoverWith") ? Argument<string>("CoverWith") :
EnvironmentVariable("CoverWith") != null ? EnvironmentVariable("CoverWith") : "DotCover"; // None, DotCover, OpenCover
var skipReSharperCodeInspect = HasArgument("SkipCodeInspect") ? Argument<bool>("SkipCodeInspect", false) || !IsRunningOnWindows(): true;
var preReleaseSuffix = HasArgument("PreReleaseSuffix") ? Argument<string>("PreReleaseSuffix") :
(AppVeyor.IsRunningOnAppVeyor && EnvironmentVariable("PreReleaseSuffix") == null) || (AppVeyor.IsRunningOnAppVeyor && AppVeyor.Environment.Repository.Tag.IsTag) ? null :
EnvironmentVariable("PreReleaseSuffix") != null ? EnvironmentVariable("PreReleaseSuffix") : "ci";
(AppVeyor.IsRunningOnAppVeyor && EnvironmentVariable("PreReleaseSuffix") == null) || (AppVeyor.IsRunningOnAppVeyor && AppVeyor.Environment.Repository.Tag.IsTag && !packageRelease)
? null : EnvironmentVariable("PreReleaseSuffix") != null ? EnvironmentVariable("PreReleaseSuffix") : "ci";
var buildNumber = HasArgument("BuildNumber") ? Argument<int>("BuildNumber") :
AppVeyor.IsRunningOnAppVeyor ? AppVeyor.Environment.Build.Number :
TravisCI.IsRunningOnTravisCI ? TravisCI.Environment.Build.BuildNumber :
Expand Down Expand Up @@ -71,7 +71,7 @@ string versionSuffix = null;

if (!string.IsNullOrEmpty(preReleaseSuffix))
{
if (packageRelease)
if (packageRelease && AppVeyor.IsRunningOnAppVeyor && AppVeyor.Environment.Repository.Tag.IsTag)
{
versionSuffix = preReleaseSuffix;
}
Expand Down

0 comments on commit 0b1e526

Please sign in to comment.