Flow Configuration from environment when doing k build
This commit is contained in:
parent
79111650f0
commit
77409f8f6e
|
|
@ -6,11 +6,14 @@ k-build
|
||||||
projectFile=''
|
projectFile=''
|
||||||
Required. Path to the project.json to build.
|
Required. Path to the project.json to build.
|
||||||
|
|
||||||
|
configuration=''
|
||||||
|
Optional. The configuration to build in. Defaults to 'debug'.
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
|
default configuration = 'debug'
|
||||||
var projectFolder='${Path.GetDirectoryName(projectFile)}'
|
var projectFolder='${Path.GetDirectoryName(projectFile)}'
|
||||||
var projectName='${Path.GetFileName(projectFolder)}'
|
var projectName='${Path.GetFileName(projectFolder)}'
|
||||||
var projectBin='${Path.Combine(projectFolder, "bin")}'
|
var projectBin='${Path.Combine(projectFolder, "bin", configuration)}'
|
||||||
|
|
||||||
directory delete="${projectBin}"
|
directory delete="${projectBin}"
|
||||||
exec program='cmd' commandline='/C kpm build ${projectFolder}' if='!IsMono'
|
exec program='cmd' commandline='/C kpm build ${projectFolder}' if='!IsMono'
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ default BASE_DIR='${Directory.GetCurrentDirectory()}'
|
||||||
default TARGET_DIR='${Path.Combine(BASE_DIR, "artifacts")}'
|
default TARGET_DIR='${Path.Combine(BASE_DIR, "artifacts")}'
|
||||||
default BUILD_DIR='${Path.Combine(TARGET_DIR, "build")}'
|
default BUILD_DIR='${Path.Combine(TARGET_DIR, "build")}'
|
||||||
default TEST_DIR='${Path.Combine(TARGET_DIR, "test")}'
|
default TEST_DIR='${Path.Combine(TARGET_DIR, "test")}'
|
||||||
default Configuration='Release'
|
default Configuration='${E("Configuration")}'
|
||||||
|
|
||||||
@{
|
@{
|
||||||
if (string.IsNullOrEmpty(E("K_BUILD_VERSION")))
|
if (string.IsNullOrEmpty(E("K_BUILD_VERSION")))
|
||||||
{
|
{
|
||||||
|
|
@ -20,6 +20,11 @@ default Configuration='Release'
|
||||||
{
|
{
|
||||||
E("K_AUTHOR", AUTHORS);
|
E("K_AUTHOR", AUTHORS);
|
||||||
}
|
}
|
||||||
|
if (string.IsNullOrEmpty(Configuration))
|
||||||
|
{
|
||||||
|
Configuration = "debug";
|
||||||
|
E("Configuration", Configuration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#repo-initialize target='initialize'
|
#repo-initialize target='initialize'
|
||||||
|
|
@ -32,7 +37,7 @@ default Configuration='Release'
|
||||||
k-clean each='var projectFile in Files.Include("src/**/project.json")'
|
k-clean each='var projectFile in Files.Include("src/**/project.json")'
|
||||||
|
|
||||||
#build-compile target='compile'
|
#build-compile target='compile'
|
||||||
k-build each='var projectFile in Files.Include("src/**/project.json")'
|
k-build each='var projectFile in Files.Include("src/**/project.json")' configuration='${Configuration}'
|
||||||
@{
|
@{
|
||||||
foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*/*.nupkg")))
|
foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*/*.nupkg")))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue