Improve configuration initialization #1875
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the
init-configtarget to validate the passed--git-refis actually the one that is checked out.If you just want the latest/edge you can omit
--git-refThen you can force
remoteas a configuration source.--config-sourceand-ccan be used interchangeably.If the application folder
docs-builder assembler config initwrites to is not available both of these will exit with an error code.Every invocation of
docs-builderanddocs-assemblerwill indicate what config source is being used:Defaults if none are provided
If
--config-sourceis not provided it will default toConfigurationSource.Localifconfigexists in thepwd, this is the default during development.Otherwise
ConfigurationSource.Embeddedwill use the configuration files embedded in the binary.Create assembler workspaces
In an empty folder you can
config init --localto clone the repository to the current working directory (pwd) instead. This makes it a lot easier to create a local assemble workspace to validate changes.In a follow up we will add commands to build to pick up different checkouts more easily.