Use make backend in VS Code tasks.json#36887
Use make backend in VS Code tasks.json#36887silverwind wants to merge 2 commits intogo-gitea:mainfrom
make backend in VS Code tasks.json#36887Conversation
The previous bare `go build` did not pass `-ldflags`, so `main.Version` was never set and defaulted to "development". This caused `AssetVersion` to always be "development", meaning browser cache was never busted between frontend rebuilds during development. Switch to `make backend` which passes the correct ldflags including the git-describe version string, and also simplifies the config by removing per-platform args. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the VS Code build tasks to invoke the repo’s make backend target so development builds get the same -ldflags-derived version metadata as standard builds, which fixes asset cache busting during frontend rebuilds.
Changes:
- Replace the VS Code “Build” task from
go buildtomake backend. - Replace the VS Code “Build (with SQLite3)” task from
go build -tags ...tomake backendwithTAGS=....
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
|
there won't be make on windows, whole point for this is to work without make for local development, otherwise you can just use make already from cli imho |
|
I guess I can hack around and make it work without |
|
I will check what's needed to eliminate make here, even thought I think the make-less startup process is inherently flawed. |
|
This will be fixed with #36896 where there will not be any more |
The previous bare
go builddid not pass-ldflags, somain.Versionwas never set and defaulted to"development". This causedAssetVersionto always be"development", meaning browser cache was never busted between frontend rebuilds during development.AssetVersion before:
1.26.0+devAssetVersion after:
1.26.0+dev-548-g6e8f78ae27