topgrade icon indicating copy to clipboard operation
topgrade copied to clipboard

myrepos specify directories to look for .mrconfig

Open reini-1 opened this issue 2 years ago • 3 comments

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 avatar Feb 23 '22 08:02 reini-1

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

reini-1 avatar Feb 23 '22 12:02 reini-1

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

r-darwish avatar May 09 '22 20:05 r-darwish

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 ...

reini-1 avatar May 10 '22 04:05 reini-1