Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing builds, updating cake script. Fixes #1159 #1160

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions NUnit3TestAdapter.sln
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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