feat: 게임 정보에 빌드 커밋 표시
프로필 배포가 고정한 전체 커밋 SHA를 프론트 빌드와 Turbo 캐시 입력에 전달한다. 게임 정보 대화상자와 데스크톱·모바일 Chromium 검증을 함께 보강한다.
This commit is contained in:
@@ -347,9 +347,11 @@ describe('buildWorkspaceCommands', () => {
|
||||
});
|
||||
|
||||
describe('buildProfileFrontendCommands', () => {
|
||||
const buildCommitSha = '0123456789abcdef0123456789abcdef01234567';
|
||||
|
||||
it('uses a profile frontend build-only Node heap without changing the shared runtime heap', () => {
|
||||
const workspaceRoot = '/srv/sammo/worktrees/0123456789abcdef';
|
||||
const commands = buildProfileFrontendCommands(workspaceRoot, buildProfile(), {
|
||||
const commands = buildProfileFrontendCommands(workspaceRoot, buildProfile(), buildCommitSha, {
|
||||
NODE_OPTIONS: '--max-old-space-size=1536',
|
||||
PROFILE_FRONTEND_BUILD_NODE_OPTIONS: '--max-old-space-size=2048',
|
||||
});
|
||||
@@ -361,6 +363,7 @@ describe('buildProfileFrontendCommands', () => {
|
||||
(command) => command.env?.PROFILE_FRONTEND_BUILD_NODE_OPTIONS === '--max-old-space-size=2048'
|
||||
)
|
||||
).toBe(true);
|
||||
expect(commands.every((command) => command.env?.VITE_BUILD_COMMIT_SHA === buildCommitSha)).toBe(true);
|
||||
expect(commands[0]?.args).toEqual([
|
||||
'exec',
|
||||
'turbo',
|
||||
@@ -377,10 +380,16 @@ describe('buildProfileFrontendCommands', () => {
|
||||
|
||||
it('keeps the shared Node heap when no frontend build override is configured', () => {
|
||||
const workspaceRoot = '/srv/sammo/worktrees/0123456789abcdef';
|
||||
const commands = buildProfileFrontendCommands(workspaceRoot, buildProfile(), {
|
||||
const commands = buildProfileFrontendCommands(workspaceRoot, buildProfile(), buildCommitSha, {
|
||||
NODE_OPTIONS: '--max-old-space-size=1536',
|
||||
});
|
||||
|
||||
expect(commands.every((command) => command.env?.NODE_OPTIONS === '--max-old-space-size=1536')).toBe(true);
|
||||
});
|
||||
|
||||
it('rejects a non-commit build version before creating cached frontend commands', () => {
|
||||
expect(() => buildProfileFrontendCommands('/srv/sammo/worktrees/main', buildProfile(), 'main')).toThrow(
|
||||
'Profile frontend build requires a full commit SHA.'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -194,6 +194,8 @@ describe('profile DEPLOY operation', () => {
|
||||
'tools/build-scripts/materialize-profile-frontend.mjs',
|
||||
'che:1010',
|
||||
]);
|
||||
expect(commandGroups[0]?.[2]?.env?.VITE_BUILD_COMMIT_SHA).toBe(SHA);
|
||||
expect(commandGroups[0]?.[3]?.env?.VITE_BUILD_COMMIT_SHA).toBe(SHA);
|
||||
expect(commandGroups[1]?.map((command) => command.args)).toEqual([
|
||||
['--filter', '@sammo-ts/infra', 'prisma:migrate:deploy:game'],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user