Fix LFS on discord bot (#39)
All checks were successful
/ check_lfs (push) Successful in 10s
On_Push / lint_fmt (push) Successful in 29s
On_Push / lint_clippy (push) Successful in 1m11s
On_Push / build (push) Successful in 2m37s
On_Push / deploy (push) Successful in 13s

Reviewed-on: #39

Thanks @esy
Co-authored-by: Daragh <esy@skynet.ie>
Co-committed-by: Daragh <esy@skynet.ie>
This commit is contained in:
esy 2025-07-06 23:28:51 +00:00 committed by silver
parent 76f8aa2712
commit 764e8cd620
2 changed files with 23 additions and 0 deletions

View file

@ -221,6 +221,7 @@
after = ["network-online.target"];
wants = [];
environment = environment_config;
path = with pkgs; [ git git-lfs ];
serviceConfig = {
User = "${cfg.user}";

View file

@ -191,6 +191,28 @@ pub mod update_icon {
{
dbg!(e);
}
if let Err(e) = Command::new("git")
// Install LFS for the repo
.arg("lfs")
.arg("install")
.current_dir(&folder)
.output()
{
dbg!(e);
}
if let Err(e) = Command::new("git")
// clone the repo, gracefully "fails"
.arg("lfs")
.arg("pull")
.arg("origin")
.arg("main")
.current_dir(&folder)
.output()
{
dbg!(e);
}
}
fn get_logos(config: &Config, config_toml: &ConfigToml) -> Vec<LogoData> {