Open eriknomitch opened 8 years ago
+1 this is really essential to make gr
usable and not have to configure it again each time you deploy to a new server.
The worst is that it doesn't even tell you it's a problem so you can search for hours. You just see:
$ gr git pull
Skipped as it does not have a .git subdirectory.
Here is my install script that auto-generates the config file if it can help anyone.
import sh, glob, os
sh.npm('install', '-g', 'git-run')
home = os.environ.get('HOME', '~') + '/'
repo = home + 'repos/'
repos = glob.glob(repo + '*')
path = home + '.grconfig.json'
text = """
{
"tags": {
"all": [
%s
]
}
}""" % ',\n '.join(('"%s"' % r for r in repos))
with open(path, 'w') as handle: handle.write(text)
I have multiples machines and I want to share a
grconfig.json
with all of them as I have aconfigs
git repository. Some of them have different$HOME
directories so the full paths required bygrconfig.json
is unfortunately a bit of a hangup.I would love to be able to use tilde for
$HOME
ingrconfig.json
. Is there any workaround currently? Otherwise, I'm going to have to write a script to generategrconfig.json
files for each machine.Love
gr
!Erik