Skip to content

Repo-Deploy is a python3 script that allows to deploy and manage several repositories from local or online yaml config

Notifications You must be signed in to change notification settings

repoDeploy/repo-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo-Deploy is a python3 script that allows to deploy and manage several repositories from local or online yaml config

Download and install rd

curl -L https://raw.githubusercontent.com/repoDeploy/repo-deploy/master/install.sh | bash

or

cd /opt ; sudo curl -L "https://github.com/repoDeploy/repo-deploy/releases/download/$(basename $(curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/repoDeploy/repo-deploy/releases/latest))/rd.tar.gz" | sudo tar -xz ; sudo ln -s /opt/rd/rd /usr/local/bin/rd

go in a dir and create a .repo-deploy.yml

- repos:
  - url: "https://gitlab.com/containers-for-socle/i3-101/config-i3"
    dir: .config/i3
    branch: main
  - url: https://gitlab.com/containers-for-socle/i3-101/config-starship.git
    dir: .config/starship
  - url: https://gitlab.com/containers-for-socle/i3-101/config-polybar
    dir: .config/polybar  
  - url: https://gitlab.com/containers-for-socle/i3-101/config-wezterm
    dir: .config/wezterm

or you can rd init https://myRepoFile.yml or rd init myOtherRepoFile.yml

and

rd init to clone multiple repo in .config

rd git status or rd anyCommand to execute any command for each repo

I have added some features like download files, add text in file or cmd loop


- files:
  - url: "https://raw.githubusercontent.com/thomas10-10/myDotFiles/master/Xresources"
    dest_file: ".config/Xresources/Xresources"
  - url: "https://raw.githubusercontent.com/thomas10-10/myDotFiles/master/polybar.sh"
    dest_file: "/usr/local/bin/polybar.sh"
    use_sudo: True
  - file: /usr/local/bin/chromium
    block: "/usr/bin/chromium --disable-logging"
    use_sudo: True
  - file: "./.bashrc"
    markers: ["#<[rd]-STARCHIP-CONFIG-BASH>","#</[rd]-STARCHIP-CONFIG-BASH>"]
    block: |
      export STARSHIP_CONFIG=~/.config/starship/starship.toml
      eval "$(starship init bash)"
      function set_win_title(){
      echo -ne "\033]0;$(basename "$PWD")\007"
      }
      starship_precmd_user_func="set_win_title"
  - file: "./.bash_aliases"
    markers: ["#<[rd]-ALIASES-CONFIG-BASH>","#</[rd]-ALIASES-CONFIG-BASH>"]
    block: |
      alias ls='lsd'

- cmd:
  - "sudo ln -sf ":
    - "/usr/share/zoneinfo/Europe/Paris /etc/localtime"
    - "/usr/bin/i3 /usr/bin/wm"
    - "/usr/bin/env /bin/env"
  - "sudo chmod +x ":
    - "/usr/local/bin/chromium"
    - "/usr/local/bin/polybar.sh"

rd init for execute

if you want to do something more advanced, I advise you to go to ansible

About

Repo-Deploy is a python3 script that allows to deploy and manage several repositories from local or online yaml config

Resources

Stars

Watchers

Forks

Packages

No packages published