Skip to content

Commit

Permalink
Merge branch 'hotfix/5.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Feb 11, 2021
2 parents 4eb5273 + 78d5515 commit 7c78116
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.cake
Expand Up @@ -38,7 +38,7 @@ Dependencies.Add("ExeToProcessWithNativeAndEmbeddedMixed");
Dependencies.Add("Costura.Template");

Components.Add("Costura.Fody");
Dependencies.Add("Costura");
Components.Add("Costura");

TestProjects.Add("Costura.Fody.Tests");

Expand Down
21 changes: 21 additions & 0 deletions deployment/cake/lib-generic.cake
Expand Up @@ -516,6 +516,12 @@ private static bool ShouldProcessProject(BuildContext buildContext, string proje
return true;
}

if (ShouldBuildProject(buildContext, projectName))
{
// Always build
return true;
}

// Experimental mode where we ignore projects that are not on the deploy list when not in CI mode, but
// it can only work if they are not part of unit tests (but that should never happen)
// if (buildContext.Tests.Items.Count == 0)
Expand All @@ -532,6 +538,21 @@ private static bool ShouldProcessProject(BuildContext buildContext, string proje

//-------------------------------------------------------------

private static bool ShouldBuildProject(BuildContext buildContext, string projectName)
{
// Allow the build server to configure this via "Build[ProjectName]"
var slug = GetProjectSlug(projectName);
var keyToCheck = string.Format("Build{0}", slug);

var shouldBuild = buildContext.BuildServer.GetVariableAsBool(keyToCheck, true);

buildContext.CakeContext.Information($"Value for '{keyToCheck}': {shouldBuild}");

return shouldBuild;
}

//-------------------------------------------------------------

private static bool ShouldDeployProject(BuildContext buildContext, string projectName)
{
// Allow the build server to configure this via "Deploy[ProjectName]"
Expand Down

0 comments on commit 7c78116

Please sign in to comment.