Setup environment vars for tasks
This commit is contained in:
parent
f8f1f7fea5
commit
f86e3f6905
|
@ -13,6 +13,8 @@ fn main() -> Result<(), std::io::Error> {
|
|||
let cmd = cli::Cli::from_args();
|
||||
let base_dir: String = cmd.basedir().to_str().unwrap().into();
|
||||
|
||||
std::env::set_var("GITBUILDDIR", &base_dir);
|
||||
|
||||
let tasks = if cmd.tasks.is_empty() {
|
||||
task::from_dir(&base_dir).expect("Could not load DB")
|
||||
} else {
|
||||
|
@ -21,6 +23,8 @@ fn main() -> Result<(), std::io::Error> {
|
|||
|
||||
let (config_folder, ignored_tasks) = task::config(&std::path::Path::new(&base_dir));
|
||||
|
||||
std::env::set_var("GITBUILDCONF", &config_folder);
|
||||
|
||||
for (task_name, task) in tasks.iter() {
|
||||
if ignored_tasks.contains(&task_name) {
|
||||
// Skip task which has CONFIG/task.ignore
|
||||
|
|
Loading…
Reference in New Issue