forked from NationTech/harmony
report Ntfy endpoint
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
use std::sync::Mutex;
|
||||
|
||||
use harmony::instrumentation::{self, HarmonyEvent};
|
||||
use log::info;
|
||||
|
||||
use crate::theme;
|
||||
|
||||
pub fn init() {
|
||||
let details: Mutex<Vec<String>> = Mutex::new(vec![]);
|
||||
@@ -21,11 +22,14 @@ pub fn init() {
|
||||
if outcome.status == harmony::interpret::InterpretStatus::SUCCESS {
|
||||
details.extend(outcome.details.clone());
|
||||
}
|
||||
} else if let HarmonyEvent::HarmonyFinished = event {
|
||||
info!("Here's a summary of what happened:");
|
||||
} else if let HarmonyEvent::HarmonyFinished = event
|
||||
&& !details.is_empty()
|
||||
{
|
||||
println!("\n{} All done! What's next for you:", theme::EMOJI_SUMMARY);
|
||||
for detail in details.iter() {
|
||||
println!("{detail}");
|
||||
println!("- {detail}");
|
||||
}
|
||||
println!();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,6 +9,7 @@ pub static EMOJI_ERROR: Emoji<'_, '_> = Emoji("⚠️", "");
|
||||
pub static EMOJI_DEPLOY: Emoji<'_, '_> = Emoji("🚀", "");
|
||||
pub static EMOJI_TOPOLOGY: Emoji<'_, '_> = Emoji("📦", "");
|
||||
pub static EMOJI_SCORE: Emoji<'_, '_> = Emoji("🎶", "");
|
||||
pub static EMOJI_SUMMARY: Emoji<'_, '_> = Emoji("🚀", "");
|
||||
|
||||
lazy_static! {
|
||||
pub static ref SECTION_STYLE: ProgressStyle = ProgressStyle::default_spinner()
|
||||
|
||||
Reference in New Issue
Block a user