diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index ff3f0c2..cd57261 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -6,7 +6,7 @@ on: env: DL_DIR: /srv/breadway-dl - ECOSYSTEM_DIR: /tmp/bread-ecosystem-ci + ECOSYSTEM_DIR: /home/breadway/Projects/bread-ecosystem PATH: /home/breadway/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin jobs: @@ -45,8 +45,12 @@ jobs: - name: ensure bread-ecosystem working-directory: /tmp run: | - rm -rf "${ECOSYSTEM_DIR}" - git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}" + if [[ -d "${ECOSYSTEM_DIR}/.git" ]]; then + git -C "${ECOSYSTEM_DIR}" pull --ff-only + else + mkdir -p "$(dirname "${ECOSYSTEM_DIR}")" + git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}" + fi - name: regenerate index.json working-directory: /tmp diff --git a/src/main.rs b/src/main.rs index 7616f31..d108e3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,11 +4,7 @@ use std::process; use clap::{Parser, Subcommand}; #[derive(Parser)] -#[command( - name = "breadpaper", - version, - about = "Wallpaper manager for the bread desktop" -)] +#[command(name = "breadpaper", version, about = "Wallpaper manager for the bread desktop")] struct Cli { /// Image file to set as wallpaper (shorthand for `set`) path: Option, @@ -20,7 +16,9 @@ struct Cli { #[derive(Subcommand)] enum Command { /// Set wallpaper, generate pywal palette, and reload bread themes - Set { path: PathBuf }, + Set { + path: PathBuf, + }, /// Print the current wallpaper path Get, }