Require release versions for script uploads
CI / checks (push) Successful in 5m26s

This commit is contained in:
2026-10-12 18:46:57 -04:00
parent ffda04f276
commit 2f52dcb1ef
50 changed files with 871 additions and 113 deletions
+8 -1
View File
@@ -84,6 +84,7 @@ async function openPlan(plan: BetaPlan, servers = [names[0]]) {
const { openBeta } = await import('../../src/lib/server/fleet/beta.js');
const { db } = await import('../../src/lib/server/db/index.js');
const { script } = createScript({
releaseVersion: '1.0.0',
name: 'Beta test',
targetRelPath: 'test.gsc',
content: Buffer.from('main() {}')
@@ -148,6 +149,7 @@ describe('durable beta test plans', () => {
fileScope === 'game' ? otherGame : otherMap
].map((scopeValue) =>
createScript({
releaseVersion: '1.0.0',
name: `Test ${scopeValue}`,
targetRelPath: `${scopeValue}.gsc`,
scopeType: fileScope,
@@ -218,7 +220,11 @@ describe('durable beta test plans', () => {
const file = listBetaScripts(id)[0];
expect(getBeta(id)?.state).toBe('ready-promote');
await reviseBeta(id, 1, [
{ scriptId: file.script_id, content: Buffer.from('main() { /* fixed */ }') }
{
scriptId: file.script_id,
releaseVersion: '1.0.1',
content: Buffer.from('main() { /* fixed */ }')
}
]);
const replacement = listBetaScripts(id)[0].script_version_id;
expect(replacement).not.toBe(file.script_version_id);
@@ -613,6 +619,7 @@ describe('durable beta test plans', () => {
const { openBeta, getBeta, listBetaServers } =
await import('../../src/lib/server/fleet/beta.js');
const { script, version } = createScript({
releaseVersion: '1.0.0',
name: 'Legacy beta',
targetRelPath: 'legacy.gsc',
content: Buffer.from('main() {}')