Skip to content

Loading…

Centralize 3rd-party assets in their own Github project #363

Open
gorhill opened this Issue · 3 comments

2 participants

@gorhill

So that they can be shared by both uBlock/uMatrix.

@Deathamns: Need advices about how to proceed best.

Here is what I wish:

  • Centralize all 3rd-party assets into uAssets
  • uBlock/uMatrix will pull whatever then need from there at package build time, respecting current path layout
  • Need a way to refresh checksums on each project as per updated content of 3rd-party assets

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.

@gorhill gorhill changed the title from Centralized 3rd-party assets in their own Github project to Centralize 3rd-party assets in their own Github project
@Deathamns

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.

@gorhill

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.

@Deathamns

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.