Skip to content

Conversation

@arturcic
Copy link
Member

@arturcic arturcic commented Jul 7, 2025

This pull request introduces changes to improve the flexibility of the GitVersionTool by making certain configuration options optional and adding test coverage for scenarios where no configuration file is provided.

Fixes #1676

Enhancements to GitVersionTool functionality:

  • src/tools/gitversion/models.ts: Updated the ExecuteSettings type to make configFilePath and overrideConfig optional, allowing for greater flexibility in tool configuration.

  • src/tools/gitversion/settings.ts: Modified the GitVersionSettingsProvider to handle optional inputs for configFilePath and overrideConfig, ensuring compatibility with the updated ExecuteSettings type.

Test coverage improvements:

  • src/__tests__/tools/gitversion/tool.spec.ts: Added a new test case to verify that the GitVersionTool correctly handles scenarios where no configuration file is provided, ensuring robust behavior in such cases.
    This pull request introduces enhancements to the GitVersionTool by 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:

  • Added a new test case in src/__tests__/tools/gitversion/tool.spec.ts to verify that the tool correctly generates arguments when no configuration file is provided.
  • Updated the logic in src/tools/gitversion/tool.ts to simplify the condition for handling updateAssemblyInfoFilename by removing unnecessary length checks.

Enhancements to configuration settings:

  • Modified the ExecuteSettings type in src/tools/gitversion/models.ts to make configFilePath, overrideConfig, and updateAssemblyInfoFilename optional, improving flexibility in configuration.
  • Updated the GitVersionSettingsProvider in src/tools/gitversion/settings.ts to handle optional inputs for configFilePath and overrideConfig, ensuring compatibility with the updated ExecuteSettings type.
@arturcic arturcic added the bug Something isn't working label Jul 7, 2025
@arturcic arturcic merged commit 1918cb0 into GitTools:main Jul 7, 2025
9 checks passed
@arturcic arturcic deleted the fix/1676 branch July 7, 2025 21:14
@mergify
Copy link
Contributor

mergify bot commented Jul 7, 2025

Thank you @arturcic for your contribution!

@arturcic arturcic added this to the v4.0.1 milestone Jul 7, 2025
@gittools-bot
Copy link
Contributor

🎉 This issue has been resolved in version v4.0.1 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants