Skip to content

Commit

Permalink
Merge pull request #149 from Inumedia/release-versionning
Browse files Browse the repository at this point in the history
Properly override versionSuffix for release builds and add build number in CI
  • Loading branch information
Inumedia authored Nov 7, 2018
2 parents 2be0472 + 8dbfee4 commit f787daa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Task("Configure")
// following SevVer 2.0.0 rules. MyGet supports SemVer 2.0.0
if (isReleaseBuild)
{
versionSuffix = string.Empty;
versionSuffix = "\"\"";
}
else
{
Expand Down Expand Up @@ -76,8 +76,7 @@ Task("Configure")
}
var versionPrefix = XmlPeek("./Directory.Build.props", "/Project/PropertyGroup/VersionPrefix");
var version = string.Join("-", versionPrefix, versionSuffix);
var version = isReleaseBuild ? $"{versionPrefix}-release.{buildNumber}" : string.Join("-", versionPrefix, versionSuffix);
if (AppVeyor.IsRunningOnAppVeyor)
{
// Update AppVeyor build version so it will match the build version in assemblies and package
Expand Down Expand Up @@ -210,7 +209,7 @@ Task("Publish")
var apiToken = EnvironmentVariable(config.token);
if (string.IsNullOrEmpty(apiToken))
{
Error("{0} environment variable not found. Unable to push package on {1}", config.token, config.provider);
Warning("{0} environment variable not found. Unable to push package on {1}", config.token, config.provider);
}
else
{
Expand Down

0 comments on commit f787daa

Please sign in to comment.