Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tera with rinja #2292

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
265 changes: 60 additions & 205 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ tempfile = "3.1.0"
fn-error-context = "0.2.0"

# Templating
tera = { version = "1.5.0", features = ["builtins"] }
rinja = "0.2"
walkdir = "2"

# Date and Time utilities
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ COPY build.rs build.rs
RUN touch build.rs
COPY src src/
RUN find src -name "*.rs" -exec touch {} \;
COPY templates/style templates/style
COPY templates templates/
COPY vendor vendor/
COPY assets assets/
COPY .sqlx .sqlx/
Expand Down
10 changes: 10 additions & 0 deletions src/db/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ impl sqlx::postgres::PgHasArrayType for BuildStatus {
}
}

impl<'a> PartialEq<&'a str> for BuildStatus {
fn eq(&self, other: &&str) -> bool {
match self {
Self::Success => *other == "success",
Self::Failure => *other == "failure",
Self::InProgress => *other == "in_progress",
}
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
Loading
Loading