Generate SVG and go-licenses.json at build time#37225
Generate SVG and go-licenses.json at build time#37225silverwind wants to merge 2 commits intogo-gitea:mainfrom
Conversation
ba227d0 to
952eb39
Compare
Moves SVG icons, material-icon JSONs, and the Go license index out of git; they regenerate on demand. Backend tolerates missing SVG assets at startup. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
These files are now produced on demand by `make svg` (SVG icons, material-icon JSONs) and by the existing `$(GO_LICENSE_FILE)` rule (go-licenses.json). Keeping them in git bloated review diffs on every dependency bump. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
08ea21c to
dc85244
Compare
|
By the way, I don't think it is maintainable to keep copying these No way to share the duplicate steps? |
Expected as documented in OP. Do you want me to add a placeholder instead?
Yes we can extract to a reusable workflow and run it via |
|
That aside, does this not cripple the license audit a bit? Right now we can check the on a PR to see if the license is detected properly for new dependencies if they show up and to check if the PR doesn't add something that would be problematic. Didn't the attempt to move to renovate gain traction from being able to run post commands after update as opposed to dependabot? |
|
Yes, license diff will now go unnoticed, that is the drawback. I don't think anyone really looks at this much during review. Post-update step could be implemented in renovate but would still need to be explained to every contributor, causing friction. |
I am, that's why I'm asking. |
|
Maybe it's better to codify some rules for acceptable licenses like we already do for JS dependencies than rely on manual review. Not sure how good the license classification is for go deps given that those carry no SPDX identifiers, but worth a try if a suitable go module for classification exists. |
Now, How can it be right? What placeholder can be right? |
|
|
I'm not looking at the license, I'm looking at the entire bundle - what was added, why was it added, does it match what I can dig out manually. |
|
Yes, I agree it's useful side-info. |
|
Decided to keep the generated files for now, so the renovate PR needs to adopt a post-update script. |

licenses.txtwith a warning.This enables to update npm and go dependencies without having to run post-upgrade steps, a quasi-prerequisite to using dependency update bots.
The Makefile still keeps a strict frontend/backend separation with no dependencies between them, but I think that separation should eventually go as it causes unnecessary complexity as seen in the actions changes.
Code changes are in 7cf7974, the other commit is the removals.