Fix release version labels across deployment views
This commit is contained in:
@@ -38,11 +38,17 @@ export function captureMoveRecipe(server: string): LaunchRecipePlan {
|
||||
? undefined
|
||||
: (db()
|
||||
.prepare(
|
||||
`SELECT v.version,v.kind,s.name
|
||||
`SELECT v.version,v.release_version,v.kind,s.name
|
||||
FROM script_versions v JOIN scripts s ON s.id=v.script_id WHERE v.id=?`
|
||||
)
|
||||
.get(file.script_version_id) as
|
||||
{ version: number; kind: string; name: string } | undefined);
|
||||
| {
|
||||
version: number;
|
||||
release_version: string | null;
|
||||
kind: string;
|
||||
name: string;
|
||||
}
|
||||
| undefined);
|
||||
const kind = version?.kind === 'baseline' ? 'config' : (version?.kind ?? before?.kind);
|
||||
if (!['script', 'plugin', 'config'].includes(kind ?? ''))
|
||||
throw new Error(`The deployed file type is unavailable for ${file.rel_path}.`);
|
||||
@@ -59,6 +65,7 @@ export function captureMoveRecipe(server: string): LaunchRecipePlan {
|
||||
path: file.rel_path,
|
||||
versionId: file.script_version_id,
|
||||
version: version?.version ?? null,
|
||||
releaseVersion: version?.release_version ?? null,
|
||||
sha256: file.sha256,
|
||||
size: file.size
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user