Skip to content

Commit

Permalink
add documentation sections for #81 and #91
Browse files Browse the repository at this point in the history
  • Loading branch information
xorpaul committed May 17, 2018
1 parent 5ab18d5 commit b0e17b4
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,47 @@ WARN: git command failed: git --git-dir /tmp/g10k/modules/https-__github.com_pup
```

See [#76](https://github.com/xorpaul/g10k/issues/76) for details.

- Autocorrecting Puppet environment names
Like in [r10k](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/git-environments.mkd#invalid_branches) for each source in your g10k config you can set the attribute `invalid_branches` with the following values:

* `correct_and_warn`: Non-word characters will be replaced with underscores and a warning will be emitted.
* `correct`: Non-word characters will silently be replaced with underscores.
* `error`: Branches with non-word characters will be ignored and an error will be emitted.

The default value is to leave the environment unchanged, which differs from the r10k default!

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

If you then call g10k with this config file and have a branch named something like `single_autocorrect-%-fooo` it will be renamed to `single_autocorrect___fooo`

See [#81](https://github.com/xorpaul/g10k/issues/81) for details.

- Support for older Git versions, like on CentOS 6
To check for really existing objects, g10k uses `master^{object}` syntax, which is not supported in older Git versions, like on CentOS 6, see [#91](https://github.com/xorpaul/g10k/issues/91)
g10k will skip this sanity check when the g10k config setting `git_object_syntax_not_supported` is set to `true` (defaults to `false`)
Example:
```
---
:cachedir: '/tmp/g10k'
git_object_syntax_not_supported: true
sources:
example:
remote: 'https://github.com/xorpaul/g10k-environment.git'
basedir: '/tmp/example/'
```

# building
```
# only initially needed to resolve all dependencies
Expand Down

0 comments on commit b0e17b4

Please sign in to comment.