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

Add support for overriding template dir #50

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

obfu5c8
Copy link
Contributor

@obfu5c8 obfu5c8 commented Oct 26, 2022

Please describe the change you are making

I'm using some custom templates for output formatting, and trying to share them between projects.
As it stands, I have to follow an overly complex routine of writing test output json to a file, cd-ing to my templates folder and then executing gotestfmt using the -input flag. It shouldn't be this hard 😭

To make (my own) life easier, I've added an optional -template-dir flag to the cli that allows overriding the base path for template lookups. This way you can point at whatever template folder you want elsewhere on the filesystem.
To maintain b/c it defaults to ./.gotestfmt.

...

Your code will be released under the Unlicense into the public domain for everyone to use for any purpose. Are you in the position, and are you willing to release your code under this license?

👍

Add optional '-template-dir' flag to 'gotestfmt' cli command that allows overriding of the default template lookup path. Defaults to './.gotestfmt' to maintain backwards compatability.
Simplify ciEnvironments mapping to easier support dynamic root template folder.
Update 'findTemplate' function to allow passing in a root directory path that is used for os filesystem lookups, but not for embed fs lookups.
@ghost
Copy link

ghost commented Mar 2, 2023

Hey @obfu5c8 I'm terribly sorry, this PR slipped through the cracks, we'll review this within a few days.

@ghost
Copy link

ghost commented May 30, 2023

@engelmi I've reviewed this, could you also take a look please?

@engelmi
Copy link
Member

engelmi commented Jun 5, 2023

@janosdebugs LGTM as well.
@obfu5c8 I updated your branch and will create a new release soon.

@engelmi engelmi merged commit 4c97682 into GoTestTools:main Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants