add stack support (#234)

This commit is contained in:
czwinzscher
2019-10-07 19:13:29 +02:00
committed by Roey Darwish Dror
parent b9125f88a9
commit 065bb87c97
3 changed files with 14 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ Just run `topgrade`. It will run the following steps:
* Upgrade [myrepos](https://myrepos.branchable.com/) managed sourcecode repositories
* Upgrade Python packages installed using [pipx](https://github.com/cs01/pipx)
* Upgrade [R globally installed packages](https://github.com/ankane/jetpack)
* Upgrade [stack](https://docs.haskellstack.org/en/stable/README/)
* Upgrade Vim/Neovim packages. Works with the following plugin frameworks:
* [NeoBundle](https://github.com/Shougo/neobundle.vim)
* [Vundle](https://github.com/VundleVim/Vundle.vim)

View File

@@ -358,6 +358,12 @@ fn run() -> Result<(), Error> {
|| generic::run_pipx_update(run_type),
config.no_retry(),
)?;
execute(
&mut report,
"stack",
|| generic::run_stack_update(run_type),
config.no_retry(),
)?;
execute(
&mut report,
"myrepos",

View File

@@ -88,6 +88,13 @@ pub fn run_pipx_update(run_type: RunType) -> Result<(), Error> {
run_type.execute(&pipx).arg("upgrade-all").check_run()
}
pub fn run_stack_update(run_type: RunType) -> Result<(), Error> {
let stack = utils::require("stack")?;
print_separator("stack");
run_type.execute(&stack).arg("upgrade").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()?;