Fix LFS on discord bot (#39)
Reviewed-on: #39 Thanks @esy Co-authored-by: Daragh <esy@skynet.ie> Co-committed-by: Daragh <esy@skynet.ie>
This commit is contained in:
parent
76f8aa2712
commit
764e8cd620
2 changed files with 23 additions and 0 deletions
|
@ -221,6 +221,7 @@
|
|||
after = ["network-online.target"];
|
||||
wants = [];
|
||||
environment = environment_config;
|
||||
path = with pkgs; [ git git-lfs ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "${cfg.user}";
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue