forked from the-distro/ofborg
Update the config format to support omitting feedback.* but not feedback.full_logs
This commit is contained in:
parent
76cea8c462
commit
1fb43ae09d
|
@ -49,18 +49,20 @@ fn main() {
|
|||
let cloner = checkout::cached_cloner(Path::new(&cfg.checkout.root));
|
||||
let nix = cfg.nix();
|
||||
|
||||
let full_logs: bool = match cfg.feedback.full_logs {
|
||||
Some(true) => true,
|
||||
None => {
|
||||
|
||||
|
||||
let full_logs: bool;
|
||||
match &cfg.feedback {
|
||||
&Some(ref feedback) => {
|
||||
full_logs = feedback.full_logs;
|
||||
}
|
||||
&None => {
|
||||
warn!("Please define feedback.full_logs in your configuration to true or false!");
|
||||
warn!("feedback.full_logs when true will cause the full build log to be sent back to the server, and be viewable by everyone.");
|
||||
warn!("I strongly encourage everybody turn this on!");
|
||||
false
|
||||
full_logs = false;
|
||||
}
|
||||
_ => {
|
||||
false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
channel.basic_prefetch(1).unwrap();
|
||||
channel.basic_consume(
|
||||
|
|
|
@ -14,7 +14,7 @@ use ofborg::acl;
|
|||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Config {
|
||||
pub runner: RunnerConfig,
|
||||
pub feedback: FeedbackConfig,
|
||||
pub feedback: Option<FeedbackConfig>,
|
||||
pub checkout: CheckoutConfig,
|
||||
pub nix: NixConfig,
|
||||
pub rabbitmq: RabbitMQConfig,
|
||||
|
@ -23,7 +23,7 @@ pub struct Config {
|
|||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct FeedbackConfig {
|
||||
pub full_logs: Option<bool>,
|
||||
pub full_logs: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
Loading…
Reference in a new issue