Closed gorhill closed 2 years ago
Maybe you could use the src/assets folder as a git submodule pointing to uAssets (in order to keep the possibility of install without building). The uAssets repository would contain what now uBlock/src/assets contains + the uMatrix/assets/umatrix folder, and there would be only one checksums.txt file, which could be used by both projects (so you don't need to generate it for each project, nor generating them every build time). Each project's build script would decide what necessary files/folders from the submodule will go into the final extension file.
Thanks for mentioning submodules, will go read more about this. Each project will need their own checksum files though, as it is not only used for what changed, but also for what third-party assets has been added/removed.
You still can have only one checksums.txt, and each project's build script will create another one at build time and include only the lines which are needed for that project (based on the json files; src/assets/ublock/filter-lists.json for µBlock, and assets/umatrix/hosts-files.json for µMatrix). Or generate the checksums into the project's folder on uAssets (this seems a better choice if you want to install it from src/) This way the operations about the assets stay in uAssets, the build scripts will do "cherry-picking" only.
Just curious, what is your reason for including all the third-party assets into the extension files, instead of fetching them remotely?
So that they can be shared by both uBlock/uMatrix.
@Deathamns: Need advices about how to proceed best.
Here is what I wish:
For the checksum part, I picture copying whatever is needed to local project directory as if we are creating a package, compute checksums, then remove local copies of 3rd-party assets.