xorpaul / g10k

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

Autocorrecting environment naming #81

Closed baurmatt closed 6 years ago

baurmatt commented 6 years ago

r10k has this super useful feature to auto correcting environment names.

This is especially helpful if the branches naming follows the bug tracker (e.g. Jira/Youtrack/...) as they tend to be something like [A-Za-z]+-[0-9]+

Could this feature be please added to g10k? :)

baurmatt commented 6 years ago

Thanks @xorpaul! :)

xorpaul commented 6 years ago

Your welcome! :)

Please note that the default value is to leave the environment unchanged, which differs from the r10k default! So you would have to set the g10k config setting invalid_branches to one of the following values:

Like in r10k

Example:

---
:cachedir: '/tmp/g10k'

sources:
  example:
    remote: 'https://github.com/xorpaul/g10k-environment.git'
    basedir: '/tmp/example/'
    invalid_branches: 'correct'