Skip to content

Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.

fix(release): resolve promotion notes path

Leggetta0d2c25a78a3
diff --git a/apps/desktop/scripts/release-assets.mjs b/apps/desktop/scripts/release-assets.mjs
index d447aa7b..73af045a 100644
--- a/apps/desktop/scripts/release-assets.mjs
+++ b/apps/desktop/scripts/release-assets.mjs
@@ -3,6 +3,9 @@ import { copyFileSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, w
import { basename, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
+const scriptDir = resolve(fileURLToPath(new URL('.', import.meta.url)));
+const desktopDir = resolve(scriptDir, '..');
+
const releasePlatforms = [
{ platform: 'darwin', arch: 'arm64', label: 'macOS Apple Silicon' },
{ platform: 'darwin', arch: 'x64', label: 'macOS Intel' },
diff --git a/apps/desktop/test/release-assets.test.mjs b/apps/desktop/test/release-assets.test.mjs
index 0a85e815..68f6b8bd 100644
--- a/apps/desktop/test/release-assets.test.mjs
+++ b/apps/desktop/test/release-assets.test.mjs
@@ -1,4 +1,5 @@
import { createHash } from 'node:crypto';
+import { spawnSync } from 'node:child_process';
import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join, resolve } from 'node:path';
@@ -132,4 +133,37 @@ describe('Desktop release assets', () => {
expect(config).toContain('repo: OpenCreator');
expect(config).not.toContain('repo: KrillinAI');
});
+
+ it('runs the release finalizer through the same CLI used by the promotion workflow', () => {
+ const data = fixture();
+ for (const [platform, arch] of [['darwin', 'x64'], ['win32', 'x64']]) {
+ for (const name of releaseAssetNames(version, platform, arch)) {
+ writeFileSync(join(data.directory, name), name);
+ }
+ }
+ for (const [platform, arch] of [
+ ['darwin', 'arm64'],
+ ['darwin', 'x64'],
+ ['win32', 'x64'],
+ ['linux', 'x64'],
+ ['linux', 'arm64']
+ ]) {
+ for (const name of krillinReleaseAssetNames(version, platform, arch)) {
+ writeFileSync(join(data.directory, name), name);
+ }
+ }
+ const notesPath = join(data.directory, '..', 'release-notes.md');
+ const result = spawnSync(process.execPath, [
+ resolve(process.cwd(), 'scripts/release-assets.mjs'),
+ data.directory,
+ `v${version}`,
+ 'krillinai/OpenCreator',
+ notesPath
+ ], { encoding: 'utf8' });
+
+ expect(result.status, result.stderr).toBe(0);
+ expect(result.stdout).toContain(`Verified 21 public release assets for v${version}`);
+ expect(readFileSync(notesPath, 'utf8')).toContain(`# OpenCreator v${version}`);
+ rmSync(notesPath);
+ });
});