Adds support for 'myrepos' cli tool (#149)
This commit is contained in:
committed by
Roey Darwish Dror
parent
93d3eb2bc3
commit
599fa49260
@@ -84,6 +84,7 @@ Just run `topgrade`. It will run the following steps:
|
|||||||
* Upgrade Emacs packages (You'll get a better output if you have [Paradox](https://github.com/Malabarba/paradox) installed)
|
* Upgrade Emacs packages (You'll get a better output if you have [Paradox](https://github.com/Malabarba/paradox) installed)
|
||||||
* Upgrade [OCaml packages](https://opam.ocaml.org/)
|
* Upgrade [OCaml packages](https://opam.ocaml.org/)
|
||||||
* Upgrade [vcpkg](https://github.com/Microsoft/vcpkg) globally installed packages
|
* Upgrade [vcpkg](https://github.com/Microsoft/vcpkg) globally installed packages
|
||||||
|
* Upgrade [myrepos](https://myrepos.branchable.com/) managed sourcecode repositories
|
||||||
* Upgrade Python packages installed using [pipx](https://github.com/cs01/pipx)
|
* Upgrade Python packages installed using [pipx](https://github.com/cs01/pipx)
|
||||||
* Upgrade [R globally installed packages](https://github.com/ankane/jetpack)
|
* Upgrade [R globally installed packages](https://github.com/ankane/jetpack)
|
||||||
* Upgrade Vim/Neovim packages. Works with the following plugin frameworks:
|
* Upgrade Vim/Neovim packages. Works with the following plugin frameworks:
|
||||||
|
|||||||
@@ -277,6 +277,12 @@ fn run() -> Result<(), Error> {
|
|||||||
|| generic::run_pipx_update(run_type),
|
|| generic::run_pipx_update(run_type),
|
||||||
config.no_retry(),
|
config.no_retry(),
|
||||||
)?;
|
)?;
|
||||||
|
execute(
|
||||||
|
&mut report,
|
||||||
|
"myrepos",
|
||||||
|
|| generic::run_myrepos_update(&base_dirs, run_type),
|
||||||
|
config.no_retry(),
|
||||||
|
)?;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
execute(&mut report, "pearl", || unix::run_pearl(run_type), config.no_retry())?;
|
execute(&mut report, "pearl", || unix::run_pearl(run_type), config.no_retry())?;
|
||||||
execute(
|
execute(
|
||||||
|
|||||||
@@ -88,6 +88,26 @@ pub fn run_pipx_update(run_type: RunType) -> Result<(), Error> {
|
|||||||
run_type.execute(&pipx).arg("upgrade-all").check_run()
|
run_type.execute(&pipx).arg("upgrade-all").check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_myrepos_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||||
|
let myrepos = utils::require("mr")?;
|
||||||
|
base_dirs.home_dir().join(".mrconfig").require()?;
|
||||||
|
|
||||||
|
print_separator("myrepos");
|
||||||
|
|
||||||
|
run_type
|
||||||
|
.execute(&myrepos)
|
||||||
|
.arg("--directory")
|
||||||
|
.arg(base_dirs.home_dir())
|
||||||
|
.arg("checkout")
|
||||||
|
.check_run()?;
|
||||||
|
run_type
|
||||||
|
.execute(&myrepos)
|
||||||
|
.arg("--directory")
|
||||||
|
.arg(base_dirs.home_dir())
|
||||||
|
.arg("update")
|
||||||
|
.check_run()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn run_custom_command(name: &str, command: &str, run_type: RunType) -> Result<(), Error> {
|
pub fn run_custom_command(name: &str, command: &str, run_type: RunType) -> Result<(), Error> {
|
||||||
print_separator(name);
|
print_separator(name);
|
||||||
run_type.execute("sh").arg("-c").arg(command).check_run()
|
run_type.execute("sh").arg("-c").arg(command).check_run()
|
||||||
|
|||||||
Reference in New Issue
Block a user