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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Optionally have build tags in generated files #153

Closed
techknowlogick opened this Issue Feb 5, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@techknowlogick
Copy link
Contributor

techknowlogick commented Feb 5, 2019

First, Thanks for packr 馃槃 it is great.

As title. Right now I append the build tags after running packr, and it would be nice to have that all as one step.

@markbates

This comment has been minimized.

Copy link
Member

markbates commented Feb 5, 2019

That鈥檚 already possible in v2. All flags get passed through with packr2 build.

@markbates markbates closed this Feb 5, 2019

@techknowlogick

This comment has been minimized.

Copy link
Contributor Author

techknowlogick commented Feb 5, 2019

Hi @markbates. I don't mean when building the binary, but when generating the *-packr.go files

@markbates markbates reopened this Feb 5, 2019

@markbates

This comment has been minimized.

Copy link
Member

markbates commented Feb 5, 2019

Re-opened now that I understand the request. Can I ask the use case for this? Would generating // +build !skip-packr work?

@techknowlogick

This comment has been minimized.

Copy link
Contributor Author

techknowlogick commented Feb 5, 2019

Use case: I'm one of the leads of Gitea, and to distribute our software on some OSes we can't compile static assets into the binary if we want our .deb to be added to the official channel, and so right now we are using bindata and have a TAG to include the bundled static assets in the binary.

Looking into this I'm guessing that this file: https://github.com/gobuffalo/packr/blob/master/v2/jam/store/disk_tmpl.go is the right place to add the above build tag you suggested. I can create a PR for this today if that's the case.

Thanks again 馃槃

@markbates

This comment has been minimized.

Copy link
Member

markbates commented Feb 5, 2019

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