Skip to content

Commit

Permalink
Add path forward
Browse files Browse the repository at this point in the history
Update rust before verbose build
  • Loading branch information
dormant-user committed Feb 13, 2024
1 parent d50acc0 commit d65613f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Mutex<minijinja::Environment<'static>>> {
// 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)
// }

0 comments on commit d65613f

Please sign in to comment.