feat: patch cs2 gameinfo after metamod install
This commit is contained in:
@@ -15,6 +15,15 @@ WITH metamod_rule AS (
|
||||
"destination": "/game/csgo",
|
||||
"stripComponents": 0,
|
||||
"maxBytes": 268435456
|
||||
},
|
||||
{
|
||||
"id": "ensure-cs2-metamod-gameinfo-entry",
|
||||
"type": "insert_before_line",
|
||||
"path": "/game/csgo/gameinfo.gi",
|
||||
"line": "\\t\\t\\tGame csgo/addons/metamod",
|
||||
"beforePattern": "^\\\\s*Game\\\\s+csgo\\\\s*$",
|
||||
"existsPattern": "^\\\\s*Game\\\\s+csgo/addons/metamod\\\\s*$",
|
||||
"skipIfExists": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -127,6 +127,15 @@ async function seed() {
|
||||
stripComponents: 0,
|
||||
maxBytes: 256 * 1024 * 1024,
|
||||
},
|
||||
{
|
||||
id: 'ensure-cs2-metamod-gameinfo-entry',
|
||||
type: 'insert_before_line',
|
||||
path: '/game/csgo/gameinfo.gi',
|
||||
line: '\t\t\tGame csgo/addons/metamod',
|
||||
beforePattern: '^\\s*Game\\s+csgo\\s*$',
|
||||
existsPattern: '^\\s*Game\\s+csgo/addons/metamod\\s*$',
|
||||
skipIfExists: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ export type ServerAutomationEvent =
|
||||
export type ServerAutomationActionType =
|
||||
| 'github_release_extract'
|
||||
| 'http_directory_extract'
|
||||
| 'insert_before_line'
|
||||
| 'write_file'
|
||||
| 'send_command';
|
||||
|
||||
@@ -51,6 +52,16 @@ export interface ServerAutomationHttpDirectoryExtractAction {
|
||||
maxBytes?: number;
|
||||
}
|
||||
|
||||
export interface ServerAutomationInsertBeforeLineAction {
|
||||
id: string;
|
||||
type: 'insert_before_line';
|
||||
path: string;
|
||||
line: string;
|
||||
beforePattern: string;
|
||||
existsPattern?: string;
|
||||
skipIfExists?: boolean;
|
||||
}
|
||||
|
||||
export interface ServerAutomationSendCommandAction {
|
||||
id: string;
|
||||
type: 'send_command';
|
||||
@@ -60,6 +71,7 @@ export interface ServerAutomationSendCommandAction {
|
||||
export type ServerAutomationAction =
|
||||
| ServerAutomationGitHubReleaseExtractAction
|
||||
| ServerAutomationHttpDirectoryExtractAction
|
||||
| ServerAutomationInsertBeforeLineAction
|
||||
| ServerAutomationWriteFileAction
|
||||
| ServerAutomationSendCommandAction;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user