fix(release): add Linux deb package metadata

Ensure Electron Builder has the project URL and maintainer metadata required by Linux deb targets, and lock the fields with release workflow coverage.

Tested: bun test scripts/pr/release-workflow.test.ts
Tested: bun run check:policy
Tested: bun run check:native
Tested: bun run verify
Confidence: high
Scope-risk: narrow
This commit is contained in:
程序员阿江(Relakkes)
2026-06-03 19:55:10 +08:00
parent 12c67f7137
commit 79d8468580
2 changed files with 30 additions and 1 deletions
+22
View File
@@ -47,6 +47,28 @@ describe('release desktop workflow', () => {
}
})
test('desktop package includes Linux deb metadata required by electron-builder', () => {
const desktopPackage = JSON.parse(readFileSync('desktop/package.json', 'utf8')) as {
description?: string
homepage?: string
author?: {
name?: string
email?: string
}
build?: {
linux?: {
maintainer?: string
}
}
}
expect(desktopPackage.description).toBeTruthy()
expect(desktopPackage.homepage).toBe('https://github.com/NanmiCoder/cc-haha')
expect(desktopPackage.author?.name).toBe('NanmiCoder')
expect(desktopPackage.author?.email).toBe('relakkes@gmail.com')
expect(desktopPackage.build?.linux?.maintainer).toBe('NanmiCoder <relakkes@gmail.com>')
})
test('release workflow requires macOS Gatekeeper launch approval before upload', () => {
const workflow = readReleaseWorkflow()
const gatekeeperStep = workflow.match(