Commit 0ec3e1ff authored by nanahira's avatar nanahira

change path

parent d0f17449
Pipeline #898 passed with stages
in 2 minutes and 51 seconds
......@@ -18,7 +18,7 @@ generate:
- npm run build
- npm start
- cd output
- tar zcvf cn-data.tar.gz deck cn.cdb lflist.conf
- tar zcvf cn-data.tar.gz deck expansions
- cd ..
artifacts:
paths:
......@@ -50,6 +50,6 @@ deploy_to_ygopro_server:
- ssh-keyscan koishi.momobako.com >> ~/.ssh/known_hosts
- echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/*
- rsync -4cavzP --delete --exclude=cn-data.tar.gz --exclude=deck output/ nanahira@koishi.momobako.com:~/ygopro-cn/expansions
- rsync -4cavzP --delete output/expansions/ nanahira@koishi.momobako.com:~/ygopro-cn/expansions
only:
- master
......@@ -48,13 +48,18 @@ export class DBReader extends Base {
}
}
private async openOutputDatabase() {
const fullPath = `${this.config.outputPath}/cn.cdb`;
const createDirectoryPath = `${this.config.outputPath}/deck/cn`;
const fullPath = `${this.config.outputPath}/expansions/cn.cdb`;
const createDirectoryPaths = [
`${this.config.outputPath}/deck/cn`,
`${this.config.outputPath}/expansions`
];
for (let createDirectoryPath of createDirectoryPaths) {
try {
await fs.access(createDirectoryPath);
} catch (e) {
this.log.debug(`Creating directory ${createDirectoryPath} ...`);
await fs.mkdir(createDirectoryPath, { recursive: true });
}
}
try {
await fs.unlink(fullPath);
......@@ -145,7 +150,7 @@ export class DBReader extends Base {
]
}
]);
await fs.writeFile(`${this.config.outputPath}/lflist.conf`, banlistString);
await fs.writeFile(`${this.config.outputPath}/expansions/lflist.conf`, banlistString);
}
private async checkExtraDeckCards(code: number) {
const sql = `select id from datas where type & (0x4000000 | 0x800000 | 0x2000 | 0x40) > 0 AND id = ?`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment