23 lines
854 B
Plaintext
23 lines
854 B
Plaintext
@{/*
|
|
|
|
kpm-pack
|
|
Builds package from project. Downloads and executes k sdk tools.
|
|
|
|
projectFile=''
|
|
Required. Path to the project.json to build.
|
|
|
|
configuration=''
|
|
Optional. The configuration to build in. Defaults to 'Debug'.
|
|
*/}
|
|
|
|
default configuration = 'Debug'
|
|
default pack_options='${E("KPM_pack_options")}'
|
|
var projectFolder='${Path.GetDirectoryName(projectFile)}'
|
|
var projectName='${Path.GetFileName(projectFolder)}'
|
|
var projectBin='${Path.Combine(projectFolder, "bin", configuration)}'
|
|
|
|
directory delete="${projectBin}"
|
|
exec program='cmd' commandline='/C kpm pack${pack_options} ${projectFolder} --configuration ${configuration}' if='!IsMono'
|
|
exec program='kpm' commandline='pack${pack_options} ${projectFolder} --configuration ${configuration}' if='IsMono'
|
|
copy sourceDir='${projectBin}' outputDir='${Path.Combine(BUILD_DIR, projectName)}'
|