Skip to content

Commit

Permalink
Merge pull request #41 from cake-contrib/release/0.9.0
Browse files Browse the repository at this point in the history
Release/0.9.0
  • Loading branch information
mvput committed Jun 22, 2019
2 parents 117589c + 47c404a commit 45b9b8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Expand Up @@ -91,11 +91,12 @@ public void Should_Add_Additional_Settings()
fixture.Settings.To = "201702062048_Migration";
fixture.Settings.Configuration = "release";
fixture.Settings.MsBuildProjectExtensionsPath = "test-obj";
fixture.Settings.NoBuild = true;
// When
var result = fixture.Run();

// Then
Assert.Equal("ef migrations script \"201702062047_Migration\" \"201702062048_Migration\" --configuration \"release\" --msbuildprojectextensionspath \"test-obj\" --context \"CakeContext\"", result.Args);
Assert.Equal("ef migrations script \"201702062047_Migration\" \"201702062048_Migration\" --configuration \"release\" --msbuildprojectextensionspath \"test-obj\" --context \"CakeContext\" --no-build", result.Args);
}
}
}
Expand Up @@ -35,5 +35,11 @@ public class DotNetCoreEfMigrationScriptSettings : DotNetCoreEfSettings
/// The DbContext to use. If omitted, the default DbContext is used.
/// </summary>
public string Context { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to not to build the project before publishing.
/// This makes build faster, but requires build to be done before publish is executed.
/// </summary>
public bool NoBuild { get; set; }
}
}
Expand Up @@ -88,6 +88,11 @@ private ProcessArgumentBuilder GetArguments(string project, ProcessArgumentBuild
builder.Append("--idempotent");
}

if (settings.NoBuild)
{
builder.Append("--no-build");
}

// Arguments
if (!arguments.IsNullOrEmpty())
{
Expand Down

0 comments on commit 45b9b8e

Please sign in to comment.