@{/* k Run klr commands in your project. Downloads and executes k sdk. kVersion='0.0.1-pre-30109-087' May be passed to override the nuget package version holding xunit console runner. kProgram='...' May be passed to override the path to the xunit program that will be executed command='' */} default kLatestSuccessful='\\wsr-teamcity\Drops\ProjectK.Main\latest-successful\sdk' default kVersion='' test if='string.IsNullOrEmpty(kVersion)' for each='var file in System.IO.Directory.EnumerateFiles(kLatestSuccessful).Select(System.IO.Path.GetFileName)' test if='file.StartsWith("ProjectK.") && file.EndsWith(".nupkg")' - kVersion = file.Substring("ProjectK.".Length, file.Length - "ProjectK.".Length - ".nupkg".Length); default kProgram='packages/ProjectK.${kVersion}/tools/k.cmd' -// Download xunit from nuget sources if not already present test if='!File.Exists(kProgram)' log info='Installing ProjectK ${kVersion} from ${kLatestSuccessful}' nuget-install package='ProjectK' packageVersion='${kVersion}' outputDir='packages' extra='-Source ${kLatestSuccessful}' exec program='${Path.GetFullPath(kProgram)}' commandline='${command}'