xorpaul / g10k

my r10k fork in Go
Apache License 2.0
125 stars 50 forks source link

add flag to keep .git directories #203

Closed anarcat closed 1 year ago

anarcat commented 1 year ago

Say I have this Puppetfile snippet:

mod 'smash/tor',
    :git => 'https://gitlab.com/shared-puppet-modules-group/tor.git',
    :commit => 'ae9c9d54ce2d03afda08a319911c9bfa473e303f' # 4.0.0

this will correctly fetch the right commit and deploy it in modules/tor, great! But it strips the .git directory as well. While that may be nice in production, on my dev workstation, I actually want to have those repositories there since I might be doing dev there as well...

Is there some flag that allows me to do this? Otherwise, would a PR adding this feature be acceptable?

Thanks!

xorpaul commented 1 year ago

There is the g10k config option clone_git_modules: true

https://github.com/xorpaul/g10k/issues/151#issuecomment-567962125

Does this look acceptable to you?

anarcat commented 1 year ago

On 2022-10-21 09:22:04, Andreas Paul wrote:

There is the g10k config option clone_git_modules: true

https://github.com/xorpaul/g10k/issues/151#issuecomment-567962125

Does this look acceptable to you?

hmm.. i don't use a g10k config file, only a Puppetfile... is there an equivalent commandline flag?

-- Striving for social justice is the most valuable thing to do in life

anarcat commented 1 year ago

There is the g10k config option clone_git_modules: true

I can confirm that it seems impossible to keep git checkouts in -puppetfile mode: there's no flag on the commandline to enable it, and there's no Puppetfile syntax for it either. I can't use -config without rewriting my Puppetfile into g10k's config file format instead, which I am hesitant in doing because then I can't switch away from g10k easily ever again...