Skip to content
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

CLI argument to support custom naming of generated history files #651

Closed
Abi-Rai opened this issue Feb 14, 2024 · 8 comments
Closed

CLI argument to support custom naming of generated history files #651

Abi-Rai opened this issue Feb 14, 2024 · 8 comments

Comments

@Abi-Rai
Copy link

Abi-Rai commented Feb 14, 2024

Hi! I absolutely love the tool.

This is a feature request for

  • Adding support for customising the name of the generated history file.
  • Being able to specify paths of files to include in historic data in reports.

The use case is the ability to have a specific folder where the reports collect/store historic data for the report and be able to add that folder to .gitignore so that most locally generated historic files are not tracked, but historic files generated in pipelines would be tracked by using glob patterns.

@danielpalme
Copy link
Owner

Hi @Abi-Rai

is it really necessary to customize the name of the history files.
They have the following name pattern: 2014-02-13_21-53-06_CoverageHistory.xml

I would suggest you use a different directory for the history files in your pipeline.
E.g. -historydir:pipelinehistory

Does that for work for you? I'm always trying to avoid new command line parameters. If I would add every requested parameter, the list would be become very long and nobody has the time to look through all the parameters.

@Abi-Rai
Copy link
Author

Abi-Rai commented Feb 14, 2024

Wow, thank you for the quick response.

If I would add every requested parameter, the list would be become very long and nobody has the time to look through all the parameters.

Funnily enough my goal was to create a predefined command and distribute it to my team (devs/non-devs) to run as part of their workflow, and I would create a pipeline step that would generate reports that we actually want to keep a history of. And with a preconfigured command they wouldn't need to spend time learning ReportGenerator's commands and could just focus on using the generated report.

I would suggest you use a different directory for the history files in your pipeline.
E.g. -historydir:pipelinehistory

With this approach, each time a report is generated with historyDir and if we want to include our local reports to be compared with the pipeline history files historydir:pipelinehistory then the user would have remember to manually delete the file to prevent pushing local history files to the repo.

Perhaps having an argument that disables generation of history files and historyDir would only read the files in the folder would be simpler?

@danielpalme
Copy link
Owner

Would the following pattern work for you:

2014-02-13_21-53-06_YOURCUSTOMTEXT_CoverageHistory.xml

@Abi-Rai
Copy link
Author

Abi-Rai commented Feb 14, 2024

Yes! that would work.

@danielpalme
Copy link
Owner

Just made the necessary changes in the code base to support that pattern.
The next release will contain this new feature.

You will be able to apple the custom text with the following command line parameter: "settings:HistoryFileNamePrefix=YOURCUSTOMTEXT"

See also:
https://github.com/danielpalme/ReportGenerator/wiki/Settings

@Abi-Rai
Copy link
Author

Abi-Rai commented Feb 14, 2024

Thank you, especially for pushing it out so quick, not to mention on the same day the issue was raised!

@danielpalme
Copy link
Owner

New version 5.2.2 is now available.

@Abi-Rai
Copy link
Author

Abi-Rai commented Feb 25, 2024

Thank you!

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

No branches or pull requests

2 participants