r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.36k stars 160 forks source link

myrepos specify directories to look for .mrconfig #864

Open reini-1 opened 2 years ago

reini-1 commented 2 years ago

I want to suggest some general feature

Topgrade should add the possibility to specify directories where to look for .mrconfig files not only in the users home directory.

More information

e.g. you have directory Source in your home directory with a .mrconfig, topgrade should run mr --directory ~/Source --config ~/Source/.mrconfg

A list of directories should be specified in the topgrade configuration file e.g. similar to the repos option for git

reini-1 commented 2 years ago

I found a workaround in a custom script and deactivated builtin myrepos step. I also need another command for mr so here is my little script:

#!/usr/bin/env sh
for dir in ~/Source1 ~/Source2 ~/Source3; do
  [ -r "${dir}/.mrconfig" ] && mr --directory "${dir}" --config "${dir}/.mrconfig" allbranchesupdate
done
r-darwish commented 2 years ago

Currently topgrade runs checkout and then upgrade. Should it change to allbranchesupdate?

reini-1 commented 2 years ago

allbranchrsupdate is s custom function in my .mrconfig that checks out one local branch after the other and did an update than. So this would not work for others ...