Merge branch 'develop' into test-aeasfgtsghdgh

This commit is contained in:
syuilo 2025-12-03 18:21:07 +09:00 committed by GitHub
commit 00ed654032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 9 deletions

View File

@ -56,6 +56,8 @@ jobs:
run: git diff --exit-code pnpm-lock.yaml run: git diff --exit-code pnpm-lock.yaml
- name: Copy Configure - name: Copy Configure
run: cp .github/misskey/test.yml .config/default.yml run: cp .github/misskey/test.yml .config/default.yml
- name: Compile Configure
run: pnpm convert:config
- name: Build - name: Build
run: pnpm build run: pnpm build
- name: Run migrations - name: Run migrations

View File

@ -22,6 +22,7 @@
], ],
"private": true, "private": true,
"scripts": { "scripts": {
"convert:config": "cd packages/backend && pnpm convert:config",
"build-pre": "node ./scripts/build-pre.js", "build-pre": "node ./scripts/build-pre.js",
"build-assets": "node ./scripts/build-assets.mjs", "build-assets": "node ./scripts/build-assets.mjs",
"build": "pnpm build-pre && pnpm -r build && pnpm build-assets", "build": "pnpm build-pre && pnpm -r build && pnpm build-assets",

View File

@ -25,13 +25,16 @@ const configDir = resolve(_dirname, '../../../.config');
*/ */
function convertYamlToJson(ymlPath, jsonPath) { function convertYamlToJson(ymlPath, jsonPath) {
if (!fs.existsSync(ymlPath)) { if (!fs.existsSync(ymlPath)) {
console.log(`${ymlPath} が見つからないためスキップします`); console.log(`skipped: ${ymlPath} is not found`);
return; return;
} }
const yamlContent = fs.readFileSync(ymlPath, 'utf-8'); const yamlContent = fs.readFileSync(ymlPath, 'utf-8');
const jsonContent = yaml.load(yamlContent); const jsonContent = yaml.load(yamlContent);
fs.writeFileSync(jsonPath, JSON.stringify(jsonContent, null, 2), 'utf-8'); fs.writeFileSync(jsonPath, JSON.stringify({
'_NOTE_': 'This file is auto-generated from YAML file. DO NOT EDIT.',
...jsonContent,
}), 'utf-8');
console.log(`${ymlPath}${jsonPath}`); console.log(`${ymlPath}${jsonPath}`);
} }
@ -53,4 +56,4 @@ if (process.env.MISSKEY_CONFIG_YML) {
convertYamlToJson(customYmlPath, customJsonPath); convertYamlToJson(customYmlPath, customJsonPath);
} }
console.log('設定ファイルの変換が完了しました'); console.log('Configuration compiled');