Make it easier for releasing versions

This commit is contained in:
2026-02-10 12:51:58 -07:00
parent 90ecda95a8
commit 2ecd8564ea
3 changed files with 9 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 04, 2026 at 12:40 AM
-- Generation Time: Feb 10, 2026 at 07:51 PM
-- Server version: 12.1.2-MariaDB
-- PHP Version: 8.5.2
@@ -62,6 +62,7 @@ CREATE TABLE `launcherversionmanifest` (
`id` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`displayName` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`releaseDate` bigint(20) NOT NULL,
`downloadUrlVersion` text NOT NULL,
`downloadUrls` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`platforms` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`executables` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,

View File

@@ -53,6 +53,7 @@ export const launcherVersionManifest = mysqlTable('launcherversionmanifest', {
id: varchar('id', { length: 24 }).primaryKey().notNull(),
displayName: text('displayName').notNull(),
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
downloadUrlVersion: text('downloadUrlVersion').notNull(),
downloadUrls: text('downloadUrls').notNull(),
platforms: text('platforms').notNull(),
executables: text('executables').notNull(),

View File

@@ -78,6 +78,7 @@ export const handler = async (context: Context) => {
displayName: launcherVersionManifest.displayName,
releaseDate: launcherVersionManifest.releaseDate,
game: launcherVersionManifest.game,
downloadUrlVersion: launcherVersionManifest.downloadUrlVersion,
downloadUrls: launcherVersionManifest.downloadUrls,
platforms: launcherVersionManifest.platforms,
executables: launcherVersionManifest.executables,
@@ -99,11 +100,14 @@ export const handler = async (context: Context) => {
const versions = versionsRaw
.map(v => ({
...v,
downloadUrls: JSON.parse(v.downloadUrls),
downloadUrls: JSON.parse(
v.downloadUrls.replaceAll('%version%', v.downloadUrlVersion)
),
platforms: JSON.parse(v.platforms),
executables: JSON.parse(v.executables),
sha512sums: JSON.parse(v.sha512sums),
sizes: JSON.parse(v.sizes),
downloadUrlVersion: undefined,
downloadUrl: undefined as string | undefined,
executable: undefined as string | undefined,
sha512sum: undefined as string | undefined,
@@ -111,6 +115,7 @@ export const handler = async (context: Context) => {
wine: undefined as boolean | undefined
}))
.filter(v => {
delete v.downloadUrlVersion
if (showAll || !platString) {
delete v.downloadUrl
delete v.executable