fix: install lfs on repo after pulling
All checks were successful
/ check_lfs (push) Successful in 6s
All checks were successful
/ check_lfs (push) Successful in 6s
package lfs into the nix env for discord bot
This commit is contained in:
parent
76f8aa2712
commit
ff6f0a16f5
2 changed files with 46 additions and 2 deletions
|
@ -221,6 +221,7 @@
|
|||
after = ["network-online.target"];
|
||||
wants = [];
|
||||
environment = environment_config;
|
||||
path = with pkgs; [ git git-lfs ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "${cfg.user}";
|
||||
|
|
|
@ -172,16 +172,22 @@ pub mod update_icon {
|
|||
let folder = format!("{}/open-governance", &config.home);
|
||||
|
||||
if let Err(e) = Command::new("git")
|
||||
match Command::new("git")
|
||||
// clone the repo, gracefully "fails"
|
||||
.arg("clone")
|
||||
.arg(url)
|
||||
.arg(&folder)
|
||||
.output()
|
||||
{
|
||||
dbg!(e);
|
||||
Err(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
Ok(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
|
||||
if let Err(e) = Command::new("git")
|
||||
match Command::new("git")
|
||||
// Update the repo
|
||||
.arg("pull")
|
||||
.arg("origin")
|
||||
|
@ -189,7 +195,44 @@ pub mod update_icon {
|
|||
.current_dir(&folder)
|
||||
.output()
|
||||
{
|
||||
dbg!(e);
|
||||
Err(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
Ok(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
}
|
||||
|
||||
match Command::new("git")
|
||||
// Install LFS for the repo
|
||||
.arg("lfs")
|
||||
.arg("install")
|
||||
.current_dir(&folder)
|
||||
.output()
|
||||
{
|
||||
Err(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
Ok(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
}
|
||||
|
||||
match Command::new("git")
|
||||
// clone the repo, gracefully "fails"
|
||||
.arg("lfs")
|
||||
.arg("pull")
|
||||
.arg("origin")
|
||||
.arg("main")
|
||||
.current_dir(&folder)
|
||||
.output()
|
||||
{
|
||||
Err(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
Ok(e) => {
|
||||
dbg!(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue