Skip to content

Commit f787daa

Browse files
authored
Merge pull request #149 from Inumedia/release-versionning
Properly override versionSuffix for release builds and add build number in CI
2 parents 2be0472 + 8dbfee4 commit f787daa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build.cake

+3-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Task("Configure")
4343
// following SevVer 2.0.0 rules. MyGet supports SemVer 2.0.0
4444
if (isReleaseBuild)
4545
{
46-
versionSuffix = string.Empty;
46+
versionSuffix = "\"\"";
4747
}
4848
else
4949
{
@@ -76,8 +76,7 @@ Task("Configure")
7676
}
7777

7878
var versionPrefix = XmlPeek("./Directory.Build.props", "/Project/PropertyGroup/VersionPrefix");
79-
var version = string.Join("-", versionPrefix, versionSuffix);
80-
79+
var version = isReleaseBuild ? $"{versionPrefix}-release.{buildNumber}" : string.Join("-", versionPrefix, versionSuffix);
8180
if (AppVeyor.IsRunningOnAppVeyor)
8281
{
8382
// Update AppVeyor build version so it will match the build version in assemblies and package
@@ -210,7 +209,7 @@ Task("Publish")
210209
var apiToken = EnvironmentVariable(config.token);
211210
if (string.IsNullOrEmpty(apiToken))
212211
{
213-
Error("{0} environment variable not found. Unable to push package on {1}", config.token, config.provider);
212+
Warning("{0} environment variable not found. Unable to push package on {1}", config.token, config.provider);
214213
}
215214
else
216215
{

0 commit comments

Comments
 (0)