-
Notifications
You must be signed in to change notification settings - Fork 5k
Use go-bindata to embed public
and templates
files into binary
#5920
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
Conversation
alimy
commented
Feb 12, 2020
- use go-bindata pack up public and templates files into gogs binary then no need public/templates file in gogs work directory.
- after this patch will make gogs update more convenience.
- after make relealse the package will just contain files below:
To install the newest go-bindata, use the following:
|
Thanks for the PR! According to https://github.com/gogs/gogs/blob/master/conf/README.md, you should use https://github.com/kevinburke/go-bindata. Can you verify the result is the same? Or re-generate if necessary. |
sorry, I don't notice the go-bindata need use github.com/kevinburke/go-bindata. Compare github.com/go-bindata/go-bindata, the github.com/kevinburke/go-bindata not support generate create http.FileSystem instance code by This patch depend go-bindata generate a function to returan a
I think github.com/go-bindata/go-bindata is good same as github.com/kevinburke/go-bindata so how about use github.com/go-bindata/go-bindata as our generate tool. |
Gogs used to use
I think this is my preferred solution. Besides, (I haven't looked at code in detail), it would be nice to have:
|
Had optimize patch:
|
public
and templates
files into binary
Thanks again for the contribution! PS: If you think you don't have bandwidth work on this in the coming week, LMK! I'll push changes to this PR. I want to get this merged :) |
Thanks your suggestions. I had update the patch and welcome optimize the code :) |
OK, I think I'm happy with the current state, merging! |
Is there any possibility to edit the templates without recompiling? |
@ozzi- A restart of Gogs is all you need if you are editing files under |