Skip to content

Commit 0358803

Browse files
committed
fix: stabilize release ci gates
1 parent e2699ee commit 0358803

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/web-self-hosted.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
run: pnpm install --frozen-lockfile
5151

5252
- name: Verify self-hosted web
53+
env:
54+
JWT_SECRET: test-secret-for-web-ci-verify-1234567890
5355
run: pnpm verify:web
5456

5557
- name: Validate Docker Compose

apps/desktop/src/main/updater.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ let mainWindow: BrowserWindow | null = null;
446446
let lastPercent = 0; // Track last progress to prevent regression
447447
// 跟踪上次进度,防止进度回退
448448

449-
const isMac = process.platform === "darwin";
449+
function isMacPlatform(): boolean {
450+
return process.platform === "darwin";
451+
}
450452

451453
function normalizeRealPath(inputPath: string): string {
452454
try {
@@ -457,7 +459,7 @@ function normalizeRealPath(inputPath: string): string {
457459
}
458460

459461
export function detectMacInstallSource(executablePath: string = process.execPath): MacInstallSource {
460-
if (!isMac) {
462+
if (!isMacPlatform()) {
461463
return "unknown";
462464
}
463465

@@ -593,7 +595,7 @@ export function initUpdater(win: BrowserWindow) {
593595
console.info("Update available:", info.version);
594596
// macOS: store update info for later DMG download
595597
// macOS: 保存更新信息,供后续 DMG 下载使用
596-
if (isMac) {
598+
if (isMacPlatform()) {
597599
lastUpdateInfo = info;
598600
console.log(
599601
`[Updater/macDMG] Stored update info: v${info.version}, files:`,
@@ -962,7 +964,7 @@ export function registerUpdaterIPC() {
962964
});
963965

964966
ipcMain.handle("updater:installSource", () => {
965-
return isMac ? getMacInstallSource() : "unknown";
967+
return isMacPlatform() ? getMacInstallSource() : "unknown";
966968
});
967969

968970
// 检查更新
@@ -1055,7 +1057,7 @@ export function registerUpdaterIPC() {
10551057

10561058
// macOS: bypass Squirrel, download DMG directly to ~/Downloads
10571059
// macOS: 绕过 Squirrel,直接下载 DMG 到 ~/Downloads
1058-
if (isMac) {
1060+
if (isMacPlatform()) {
10591061
if (getMacInstallSource() === "homebrew") {
10601062
return {
10611063
success: false,
@@ -1122,7 +1124,7 @@ export function registerUpdaterIPC() {
11221124
fromVersion: app.getVersion(),
11231125
});
11241126

1125-
if (isMac) {
1127+
if (isMacPlatform()) {
11261128
if (getMacInstallSource() === "homebrew") {
11271129
return {
11281130
success: false,
@@ -1187,7 +1189,7 @@ export function registerUpdaterIPC() {
11871189
ipcMain.handle("updater:openDownloadedUpdate", async () => {
11881190
// macOS: show the downloaded DMG in Finder
11891191
// macOS: 在 Finder 中显示已下载的 DMG
1190-
if (isMac && macDownloadedDmgPath && fs.existsSync(macDownloadedDmgPath)) {
1192+
if (isMacPlatform() && macDownloadedDmgPath && fs.existsSync(macDownloadedDmgPath)) {
11911193
shell.showItemInFolder(macDownloadedDmgPath);
11921194
return { success: true, path: macDownloadedDmgPath };
11931195
}

apps/desktop/tests/unit/components/skill-store-remote.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe("SkillStore remote loading", () => {
228228
expect(getByText("Failed to load remote store")).toBeInTheDocument();
229229
expect(
230230
getByText(
231-
"GitHub API rate limit reached. Try again in a few minutes, or switch to another network and retry.",
231+
"GitHub API rate limit reached. Try again in a few minutes, or switch this repository URL to SSH to avoid the anonymous API limit.",
232232
),
233233
).toBeInTheDocument();
234234
});

0 commit comments

Comments
 (0)