Skip to content

Commit

Permalink
Merge branch 'master' into addworkflowdispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Apr 8, 2024
2 parents a8959ce + 80474a9 commit 89a230a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
2 changes: 0 additions & 2 deletions NUnit3TestAdapter.sln
Expand Up @@ -7,8 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
.runsettings = .runsettings
appveyor.yml = appveyor.yml
azure-pipelines.yml = azure-pipelines.yml
build.cake = build.cake
build.cmd = build.cmd
build.ps1 = build.ps1
Expand Down
48 changes: 2 additions & 46 deletions build.cake
@@ -1,5 +1,5 @@
#tool vswhere&version=3.1.1
#tool Microsoft.TestPlatform&version=17.7.2
#tool vswhere&version=3.1.7
#tool Microsoft.TestPlatform&version=17.9.0

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -20,43 +20,6 @@ var modifier = "-beta.1";
var dbgSuffix = configuration.ToLower() == "debug" ? "-dbg" : "";
var packageVersion = version + modifier + dbgSuffix;
Information("Packageversion: "+packageVersion);
if (BuildSystem.IsRunningOnAppVeyor)
{
var tag = AppVeyor.Environment.Repository.Tag;

if (tag.IsTag)
{
packageVersion = tag.Name;
}
else
{
var buildNumber = AppVeyor.Environment.Build.Number.ToString("00000");
var branch = AppVeyor.Environment.Repository.Branch.Replace(".", "").Replace("/", "");
var isPullRequest = AppVeyor.Environment.PullRequest.IsPullRequest;

if (branch == "master" && !isPullRequest)
{
packageVersion = version + "-dev-" + buildNumber + dbgSuffix;
}
else
{
var suffix = "-ci-" + buildNumber + dbgSuffix;

if (isPullRequest)
suffix += "-pr-" + AppVeyor.Environment.PullRequest.Number;
else
suffix += "-" + System.Text.RegularExpressions.Regex.Replace(branch, "[^0-9A-Za-z-]+", "-");

// Nuget limits "special version part" to 20 chars. Add one for the hyphen.
if (suffix.Length > 21)
suffix = suffix.Substring(0, 21);

packageVersion = version + suffix;
}
}

AppVeyor.UpdateBuildVersion(packageVersion);
}

var packageName = "NUnit3TestAdapter-" + packageVersion;

Expand Down Expand Up @@ -349,13 +312,6 @@ Task("CI")
.IsDependentOn("Package")
.IsDependentOn("Acceptance");

Task("Appveyor")
.IsDependentOn("Build")
.IsDependentOn("Test")
.IsDependentOn("Package")
.IsDependentOn("Acceptance");


Task("Default")
.IsDependentOn("Build");

Expand Down

0 comments on commit 89a230a

Please sign in to comment.