fix(czdev): meta.json 写入 pool 布局资源路径与 author(修商店无图标/@undefined)#13
Merged
Conversation
publish copies the icon and screenshots into pool/main/<pkg>/ flat (icon at <basename>, screenshots under screenshots/<basename>) but meta.json kept the app-builder.json source-repo paths (e.g. share/images/foo.png, store/screenshots/a.png), so the store registry generator resolved them to 404s and every czdev-submitted app rendered without an icon. Rewrite both fields to the layout the files were actually copied into. meta.json also carried no author, which the store showed as '@undefined'. Emit an author object from the authenticated GitHub login plus the Maintainer display name, letting an explicit store.author in app-builder.json take precedence. (The store's registry generator now also normalizes legacy meta.json on its side, so previously published packages are already fixed; this makes new submissions correct at the source.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
商店(cardputer.cc)上所有经 czdev 提交的应用都不显示图标、作者显示
@undefined。根因有两个,都出在czdev publish生成的meta.json:pool/main/<pkg>/(图标在顶层、截图在screenshots/下),但meta.json里保留的还是app-builder.json的源码仓库相对路径(share/images/foo.png、packaging/icon.png、store/screenshots/a.png),registry 生成器按 pool 路径去拼 raw URL → 全部 404。@undefined。修复
meta.json前把icon/screenshots重写为 pool 布局相对路径(basename /screenshots/<basename>);author:{"github": <登录名>, "display_name": <Maintainer 显示名>}(app-builder.json里显式给了store.author则优先)。说明
商店侧的 registry 生成器已经加了兜底(对存量 meta.json 按 basename 归一化 + 从 Maintainer 推导 author,线上 25 个应用已全部恢复图标和作者),所以本 PR 不影响已发布的包;它的意义是让新提交从源头就正确,不再依赖服务端兜底。
验证
python3 -m py_compile通过。