mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
expose lArchive
This commit is contained in:
parent
2147346493
commit
cf10d5c795
@ -432,12 +432,19 @@ void Laminar::assignNewJobs() {
|
||||
run->lastResult = RunState(result);
|
||||
});
|
||||
|
||||
// create a working directory (different to a workspace!)
|
||||
fs::path wd = fs::path(homeDir)/"run"/run->name/std::to_string(run->build);
|
||||
if(!fs::is_directory(wd) && !fs::create_directory(wd)) {
|
||||
if(!fs::create_directory(wd)) {
|
||||
KJ_LOG(ERROR, "Could not create working directory", wd.string());
|
||||
break;
|
||||
}
|
||||
run->wd = wd.string();
|
||||
// create an archive directory
|
||||
fs::path archive = fs::path(homeDir)/"archive"/run->name/std::to_string(run->build);
|
||||
if(!fs::create_directories(archive)) {
|
||||
KJ_LOG(ERROR, "Could not create archive directory", archive.string());
|
||||
break;
|
||||
}
|
||||
|
||||
// add scripts
|
||||
fs::path cfgDir = fs::path(homeDir)/"cfg";
|
||||
|
@ -87,6 +87,7 @@ bool Run::step() {
|
||||
setenv("lResult", to_string(result).c_str(), true);
|
||||
setenv("lLastResult", to_string(lastResult).c_str(), true);
|
||||
setenv("lWorkspace", (fs::path(laminarHome)/"run"/name/"workspace").string().c_str(), true);
|
||||
setenv("lArchive", (fs::path(laminarHome)/"archive"/name/buildNum.c_str()).string().c_str(), true);
|
||||
for(auto& pair : params) {
|
||||
setenv(pair.first.c_str(), pair.second.c_str(), false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user