diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index eba55c4..073e4ad 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,6 +78,16 @@ jobs: echo "Release ID: $release_id" echo "release_id=$release_id" >> "$GITHUB_OUTPUT" shell: bash + - name: Update Rust + if: env.release == 'false' + run: | + printf '*%.0s' {1..60} && printf "\n" + echo "Existing rust version: $(rustc --version)" + printf '*%.0s' {1..60} && printf "\n\n" + rustup update && printf "\n" + printf '*%.0s' {1..60} && printf "\n" + echo "Updated rust version: $(rustc --version)" + printf '*%.0s' {1..60} && printf "\n" - name: Build verbose if: env.release == 'false' run: cargo build --verbose diff --git a/src/template.rs b/src/template.rs index 7b786a0..f5c3339 100644 --- a/src/template.rs +++ b/src/template.rs @@ -16,3 +16,22 @@ pub static SESSION: &str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/sr /// Unauthorized page template that is served as HTML response after failed authentication. pub static UNAUTHORIZED: &str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/templates/unauthorized.html")); + +// fn template_path(filename: &'static str) -> String { +// PathBuf::new() +// .join(env!("CARGO_MANIFEST_DIR")) +// .join("src") +// .join("templates") +// .join(format!("{}.html", filename)) +// .to_string_lossy() +// .to_string() +// } +// +// pub fn jinja_template() -> Arc>> { +// let mut env = minijinja::Environment::new(); +// for html in ["landing", "listing", "logout", "session", "unauthorized"] { +// env.add_template(&html, &template_path(html)).unwrap(); +// } +// let mutex = Mutex::new(env.to_owned()); +// Arc::new(mutex) +// }