release: SnapCAD Studio 1.0.10 (desktop menuler, macOS kisayollari, YakNet SSO)
Build and Push Docker Images / build (push) Canceled after 0s
Desktop Release / Build linux desktop (push) Canceled after 0s
Desktop Release / Build windows desktop (push) Canceled after 0s
Desktop Release / Attach packages to release (push) Canceled after 0s
Desktop Release / Build macos desktop (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s

This commit is contained in:
Enes Yakıştır
2026-11-12 10:12:35 +03:00
parent d5cc023856
commit ee28672e23
81 changed files with 10729 additions and 821 deletions
+55
View File
@@ -0,0 +1,55 @@
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
import { basename, dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const repoRoot = dirname(dirname(fileURLToPath(import.meta.url)));
const distDir = join(repoRoot, "dist", "desktop");
const updatesDir = join(repoRoot, "updates");
const latestYmlPath = join(distDir, "latest.yml");
if (!existsSync(latestYmlPath)) {
console.error(`[publish-desktop-updates] Bulunamadı: ${latestYmlPath}. Önce 'npm run desktop:dist' çalıştırın.`);
process.exit(1);
}
const yamlText = readFileSync(latestYmlPath, "utf8");
const urlMatches = Array.from(yamlText.matchAll(/^\s*-\s*url:\s*([^\r\n]+)$/gm)).map((m) => m[1].trim());
const pathMatch = yamlText.match(/^path:\s*([^\r\n]+)$/m)?.[1]?.trim();
const artifactNames = new Set(urlMatches);
if (pathMatch) artifactNames.add(pathMatch);
if (artifactNames.size === 0) {
console.error("[publish-desktop-updates] latest.yml içinde kurulum dosyası referansı bulunamadı.");
process.exit(1);
}
mkdirSync(updatesDir, { recursive: true });
const copied = [];
for (const rawName of artifactNames) {
const safeName = basename(rawName);
const srcArtifact = join(distDir, safeName);
if (!existsSync(srcArtifact)) {
console.error(`[publish-desktop-updates] Eksik dosya: ${srcArtifact}`);
process.exit(1);
}
const destArtifact = join(updatesDir, safeName);
copyFileSync(srcArtifact, destArtifact);
copied.push({ name: safeName, bytes: statSync(destArtifact).size });
const blockmapName = `${safeName}.blockmap`;
const srcBlockmap = join(distDir, blockmapName);
if (existsSync(srcBlockmap)) {
const destBlockmap = join(updatesDir, blockmapName);
copyFileSync(srcBlockmap, destBlockmap);
copied.push({ name: blockmapName, bytes: statSync(destBlockmap).size });
}
}
const destYml = join(updatesDir, "latest.yml");
copyFileSync(latestYmlPath, destYml);
copied.push({ name: "latest.yml", bytes: statSync(destYml).size });
for (const item of copied) {
console.log(`[publish-desktop-updates] Yayınlandı: updates/${item.name} (${(item.bytes / (1024 * 1024)).toFixed(2)} MB)`);
}