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"];
|
after = ["network-online.target"];
|
||||||
wants = [];
|
wants = [];
|
||||||
environment = environment_config;
|
environment = environment_config;
|
||||||
|
path = with pkgs; [ git git-lfs ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
|
|
|
@ -172,16 +172,22 @@ pub mod update_icon {
|
||||||
let folder = format!("{}/open-governance", &config.home);
|
let folder = format!("{}/open-governance", &config.home);
|
||||||
|
|
||||||
if let Err(e) = Command::new("git")
|
if let Err(e) = Command::new("git")
|
||||||
|
match Command::new("git")
|
||||||
// clone the repo, gracefully "fails"
|
// clone the repo, gracefully "fails"
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.arg(url)
|
.arg(url)
|
||||||
.arg(&folder)
|
.arg(&folder)
|
||||||
.output()
|
.output()
|
||||||
{
|
{
|
||||||
|
Err(e) => {
|
||||||
|
dbg!(e);
|
||||||
|
}
|
||||||
|
Ok(e) => {
|
||||||
dbg!(e);
|
dbg!(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(e) = Command::new("git")
|
if let Err(e) = Command::new("git")
|
||||||
|
match Command::new("git")
|
||||||
// Update the repo
|
// Update the repo
|
||||||
.arg("pull")
|
.arg("pull")
|
||||||
.arg("origin")
|
.arg("origin")
|
||||||
|
@ -189,8 +195,45 @@ pub mod update_icon {
|
||||||
.current_dir(&folder)
|
.current_dir(&folder)
|
||||||
.output()
|
.output()
|
||||||
{
|
{
|
||||||
|
Err(e) => {
|
||||||
dbg!(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_logos(config: &Config, config_toml: &ConfigToml) -> Vec<LogoData> {
|
fn get_logos(config: &Config, config_toml: &ConfigToml) -> Vec<LogoData> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue