mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
refactor(stage-tamagotchi): require Steam app id env and generate steam_appid.txt
This commit is contained in:
@@ -35,6 +35,8 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
VITE_DISTRIBUTION: steam
|
||||
VITE_STEAM_APP_ID: '3885340'
|
||||
STEAM_APP_ID: '3885340'
|
||||
VITE_DISABLE_CUSTOM_PROVIDERS: 'true'
|
||||
VITE_DISABLE_FLUX_PURCHASE: 'true'
|
||||
VITE_ENABLE_POSTHOG: 'false'
|
||||
|
||||
@@ -49,6 +49,7 @@ coverage/
|
||||
|
||||
# Steamworks SDK (download from Steamworks partner site; not redistributable in git)
|
||||
apps/stage-tamagotchi/steamworks_sdk/
|
||||
apps/stage-tamagotchi/steam_appid.txt
|
||||
|
||||
# Build
|
||||
out/
|
||||
|
||||
@@ -28,10 +28,10 @@ import { errorMessageFrom } from '@moeru/std'
|
||||
import { ofetch } from 'ofetch'
|
||||
|
||||
// NOTICE:
|
||||
// Default must stay in sync with apps/stage-tamagotchi/steam_appid.txt and the
|
||||
// VITE_STEAM_APP_ID fallback in services/steam/client.ts. STEAM_APP_ID lets CI
|
||||
// override the app id without changing the committed dev file.
|
||||
const STEAM_APP_ID = process.env.STEAM_APP_ID?.trim() || '3885340'
|
||||
// Required in CI and local packaging; the same value is exposed to the client
|
||||
// build as VITE_STEAM_APP_ID and to the server as STEAM_APP_ID. steam_appid.txt
|
||||
// is generated by packSteamRedistributables, so it is not committed.
|
||||
const STEAM_APP_ID = process.env.STEAM_APP_ID?.trim()
|
||||
|
||||
// NOTICE:
|
||||
// Temporary CI fallback is the public rlabrecque/SteamworksSDK mirror (Valve copyright).
|
||||
@@ -71,6 +71,9 @@ export async function packSteamRedistributables(
|
||||
platform: SteamRedistributablePlatform,
|
||||
destDir: string,
|
||||
): Promise<void> {
|
||||
if (!STEAM_APP_ID)
|
||||
throw new Error('STEAM_APP_ID environment variable is required')
|
||||
|
||||
const relativePath = redistributables[platform]
|
||||
|
||||
// Resolve so relative dests are anchored to process.cwd() (pnpm -F exec uses the
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
3885340
|
||||
Reference in New Issue
Block a user