-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix logging to the output #1381
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added logging and environment variable settings for tool installation paths to improve transparency and configuration management. Now, if a path is determined, it is appended to PATH and stored as an environment variable, ensuring smooth execution in diverse environments. The refactoring also clarifies variable naming for better code readability.
Consolidate error handling logic by introducing a new safeExecute utility function to manage task execution and streamline methods for setup, create, discard, close, open, publish, and addAsset functionalities. This refactoring reduces code duplication and enhances maintainability by standardizing success and failure messaging.
The changes move the GitVersion output processing into a separate method for improved readability and maintainability. This refactor helps isolate responsibilities within the code, making it easier to manage and understand the logic related to JSON parsing and result handling. The behavior of the code remains unchanged, ensuring that it still appropriately handles GitVersion's JSON output.
Introduced a new abstract `RunnerBase` class to standardize runner operations. Updated `Runner` classes to extend `RunnerBase`, reducing code duplication by utilizing common methods such as `safeExecute` and `disableTelemetry`. This refactoring enhances maintainability and readability across the runner implementations.
Renamed RunnerBase.ts to runner.ts for convention consistency. Enhanced error handling and logging by introducing tool-specific debug messages when actions fail. Refactored GitVersion tool execution methods to use safeExecute for improved error management.
Updated the `INPUT_VERSIONSPEC` from `6.x` to `6.0.x` in azure.env, local.env, and github.env to ensure precision in version selection. This change helps in avoiding unintended major version upgrades while maintaining minor updates within the 6.0 release series.
Include the '/l' and 'console' flags in the GitVersion tool execution arguments to enable logging to the console. Update corresponding test cases to reflect these new arguments ensuring the tool's behavior is accurately tested in different scenarios. This change will help in debugging by providing real-time feedback during the tool's execution.
2 tasks
Thank you @arturcic for your contribution! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Attempt to fix #1224 and #1224