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 frontend/backend make targets, fix source release #10325
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10325 +/- ##
==========================================
- Coverage 43.75% 43.74% -0.02%
==========================================
Files 586 586
Lines 81265 81265
==========================================
- Hits 35560 35549 -11
- Misses 41309 41317 +8
- Partials 4396 4399 +3
Continue to review full report at Codecov.
|
b19dabd
to
b597efd
Compare
Decision made, see #10325 (comment) |
I guess it depends. As long as it's still useful for the package distributions, I figure the smaller the better. But I can't really say what "strict rules" they need to abide. 😓 Please take this with a grain of salt since packages and distributions are not my area of expertise: I think it would be cool to leave only go code left for compiling, with all assets ready to pack (css, js, etc). That way anyone's offline-built Gitea would be as close to our own packages as it gets. If any intermediate node stages could give us a surprise in one platform or another, that's avoided (*). We should probably not include anything node related (save of course source code directly from our repo) since anybody else that just wants the tarball for building from source can actually go and download those. (*) We've recently turned down a js library because it referenced pre-compiled binaries that were not available in all platforms; I can't remember what it was ATM. |
Yeah I guess it's a matter of "we compile" vs. "user compiles". But given that the target is the browser, it really does not matter who does it and I think we're in a better position to produce proper files then relying on a inconsistent Node.js version installed by the distributor on their build system. Still Node.js should stay as a build dependency of course, even if not used in this special case. Native Node.js dependencies are a absolute no-go and I think we should actually enforce a check for it on CI, maybe something I will check out later. I will update the PR to include the assets again later. |
This will need a 1.11 backport to fully resolve #10253. |
61cef15
to
d76d179
Compare
So the only remaining topic here is whether we should attempt to skip the fomantic/webpack build because depending on |
👍 I vote for skipping them. If we reorder the dependency tree (maybe split a couple of them in two) we should be able to remove those from the list. i.e. |
If I remove them from the prereq chain, |
Sounds good to me! |
build-from-archive ? |
d7eb454
to
8dfd69c
Compare
PR reworked, here is a updated summary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this looks much nicer! 🚀
- Add 'make backend' and 'make frontend' make targets which are used to build go and js/css/svg files respectively. - The 'backend' target can be invoked without requiring Node.js to be present on the system if pre-built frontend assets are present like in the release source tarballs. - Fix source releases missing 'dist' folders inside 'node_modules' which were erronously excluded from tar. - Store VERSION in file VERSION for the release tarballs and prefer that file over git-derived version.
823ba98
to
924d4df
Compare
Please send backport to v1.11 |
Backport: #10414 |
* Add frontend/backend make targets, fix source release - Add 'make backend' and 'make frontend' make targets which are used to build go and js/css/svg files respectively. - The 'backend' target can be invoked without requiring Node.js to be present on the system if pre-built frontend assets are present like in the release source tarballs. - Fix source releases missing 'dist' folders inside 'node_modules' which were erronously excluded from tar. - Store VERSION in file VERSION for the release tarballs and prefer that file over git-derived version. * fix release task * fix typo * fix another typo Fixes: go-gitea#10253
* Add frontend/backend make targets, fix source release - Add 'make backend' and 'make frontend' make targets which are used to build go and js/css/svg files respectively. - The 'backend' target can be invoked without requiring Node.js to be present on the system if pre-built frontend assets are present like in the release source tarballs. - Fix source releases missing 'dist' folders inside 'node_modules' which were erronously excluded from tar. - Store VERSION in file VERSION for the release tarballs and prefer that file over git-derived version. * fix release task * fix typo * fix another typo Fixes: #10253
Sorry, I'm confused: in current master branch (6b01972) I find no |
6b01972 is from 6 days ago, this was merged after that |
|
Fix missing 'dist' folders inside 'node_modules' being excluded because of tar excluding them recursively.
Add 'make build-offline' which skips on verifying node_modules and stops npx from downloading missing dependencies on-demand.
Store VERSION in file VERSION for the release tarballs and prefer that file over git-derived version.