MobileNativeFoundation / XCLogParser

Tool to parse Xcode and xcodebuild logs stored in the xcactivitylog format
Apache License 2.0
1.73k stars 120 forks source link

Add the Option to Generate HTML Report Directly Under --output Folder #98

Closed hilsenrat closed 4 years ago

hilsenrat commented 4 years ago

We want to publish the HTML report for each build in Jenkins. For this purpose, we need to know the name of the root folder that includes the index.html file.
Right now, if you specify an output path using the --output flag, the report is being generated not under that folder, but another folder is being created (with the build timestamp as its name), and the report is being generated to it.
This makes the integration with the Jenkins plugin a bit tricky, since I need to either parse the output path from the shell output (the full path of index.html is being printed to the terminal), or ls to the folder I configured using the --output flag.

If I could assign the exact folder path while running XCLogParser, it would ease up the integration.
I assume that generating the timestamp folder is more relevant while running on dev local machines, to avoid duplicates, but it's less relevant in CI environments, since the build folder (including derived_data) is being cleaned after each build. So maybe an additional CI=true flag could be useful here?

WDYT?

alrocha commented 4 years ago

Hello! Thanks for the input, we think that what you have suggested make sense. What do you think about add a new parameter as --rootOutput so we can generate the HTML file, into your path/index.html? We wouldn't like to remove the current behaviour due to the people that are using the project as it is right now, but we could add a new parameter with a these new behaviour.

hilsenrat commented 4 years ago

Thanks for the quick response!

Yes, I understand the need to not break existing functionality. The --rootOutput parameter sounds great.

ecamacho commented 4 years ago

We merged the feature: https://github.com/spotify/XCLogParser/pull/105