-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Stop packaging node_modules in release tarballs #15273
Conversation
c6ee793
to
3803d24
Compare
3803d24
to
44bbc19
Compare
@silverwind is there a reason to dorp npm-cache? I thought this was to be able building frontend without internet conection |
Yes, I think npm cache is not something that is meant to be interfaced with directly and doing so introduces a lot of unnecessary complexity that is also prone to break on future npm versions. I'm not sure how others feel about this but for me it has crossed the threshold of being maintainable in the long run. |
I'm ok with it, as long as |
Yeah, I actually know this. The fact npm 7 changes so much as to convert relative path to absolute path (!) has really made me rethink about this. Also, I revisited Gogs and saw them still relying on |
@6543 If you are excluding Also the second |
The |
Hold on a bit with merging here, I will do a few more corrections as discussed. |
well for me it is ok ... still need one lgtm - will add wip lable you can remove if u are done |
Ready again for review. I used a sub-make call to enable rm -rf /tmp/buildtest && mkdir /tmp/buildtest
make frontend generate release-sources && cp dist/release/gitea-src-master.tar.gz /tmp/buildtest
# disable wifi
cd /tmp/buildtest && tar xf gitea-src-master.tar.gz && TAGS=bindata make build Also, I added a bunch more tarball excludes for directories that can exist in a development setup, so the locally built tarballs should be close to what the CI builds. |
- Don't package node_modules in tarballs, they are not cross-platform anymore and npm cache should not be messed with directly. Instead, require an internet connection to rebuild the UI, which is not necessary in the general use case because prebuilt UI files are shipped in the public directory. - Simplify the fomantic build and make the target phony. We don't need anything more for something that is rarely ran. - Use regular tar again to build tarballs and add variable for excludes - Disable annoying npm update notifications Fixes: go-gitea#14578 Fixes: go-gitea#15256 Fixes: go-gitea#15262
959877c
to
7f33fe0
Compare
Rebased and squashed. |
Fixes: #14578
Fixes: #15256
Fixes: #15262