Merge branch 'develop' into test-aeasfgtsghdgh
This commit is contained in:
commit
00ed654032
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
run_id: context.payload.workflow_run.id,
|
run_id: context.payload.workflow_run.id,
|
||||||
});
|
});
|
||||||
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
|
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
|
||||||
return artifact.name.startsWith("memory-artifact-") || artifact.name == "memory-artifact"
|
return artifact.name.startsWith("memory-artifact-") || artifact.name == "memory-artifact"
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue