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.
This pull request introduces changes to improve the flexibility of the
GitVersionToolby making certain configuration options optional and adding test coverage for scenarios where no configuration file is provided.Fixes #1676
Enhancements to
GitVersionToolfunctionality:src/tools/gitversion/models.ts: Updated theExecuteSettingstype to makeconfigFilePathandoverrideConfigoptional, allowing for greater flexibility in tool configuration.src/tools/gitversion/settings.ts: Modified theGitVersionSettingsProviderto handle optional inputs forconfigFilePathandoverrideConfig, ensuring compatibility with the updatedExecuteSettingstype.Test coverage improvements:
src/__tests__/tools/gitversion/tool.spec.ts: Added a new test case to verify that theGitVersionToolcorrectly handles scenarios where no configuration file is provided, ensuring robust behavior in such cases.This pull request introduces enhancements to the
GitVersionToolby improving argument handling, making certain settings optional, and refining input validation. The changes focus on improving flexibility and robustness in configuration handling.Improvements to argument handling:
src/__tests__/tools/gitversion/tool.spec.tsto verify that the tool correctly generates arguments when no configuration file is provided.src/tools/gitversion/tool.tsto simplify the condition for handlingupdateAssemblyInfoFilenameby removing unnecessary length checks.Enhancements to configuration settings:
ExecuteSettingstype insrc/tools/gitversion/models.tsto makeconfigFilePath,overrideConfig, andupdateAssemblyInfoFilenameoptional, improving flexibility in configuration.GitVersionSettingsProviderinsrc/tools/gitversion/settings.tsto handle optional inputs forconfigFilePathandoverrideConfig, ensuring compatibility with the updatedExecuteSettingstype.