Skip to content

Commit 56f0219

Browse files
committed
Debug for local setting
1 parent 684cfed commit 56f0219

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

bin/zipper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const zipArchive = async () => {
3434
const filename = `${base}_${pform}${ext}`;
3535
const filepath = path.join(targetDir, filename);
3636
if (pform !== "win") {
37-
execSync(`./node_modules/.bin/node-codesign ${filepath} "${identity}"`);
37+
//execSync(`./node_modules/.bin/node-codesign ${filepath} "${identity}"`);
3838
}
3939
archive.file(filepath, { name: filename });
4040
});

src/torii.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ const script_path = path.dirname(process.argv[1].match(/^(?:C:)?[\\\/]snapshot[\
5454
const config_file = args.options.config ? path.resolve(cwd, args.options.config) : path.resolve(script_path, './torii.json');
5555
const settings = fs.readJsonSync(config_file);
5656
const setting_version = settings.version || '1.0.0';
57-
let config_local;
57+
let setting_local;
5858
try {
59-
config_local = args.options.local_config ? path.resolve(cwd, args.options.local_config) : path.resolve(script_path, './torii_local.json');
59+
const config_local = args.options.local_config ? path.resolve(cwd, args.options.local_config) : path.resolve(script_path, './torii_local.json');
60+
setting_local = fs.readJsonSync(config_local);
6061
} catch(e) {
61-
config_local = {};
62+
setting_local = {};
6263
}
63-
const shooter = args.options.shooter || config_local.shooter || 'Shooter not reported - must update';
64-
const gdate = args.options.date || config_local.date;
64+
const shooter = args.options.shooter || setting_local.shooter || 'Shooter not reported - must update';
65+
const gdate = args.options.date || setting_local.date;
6566
const ndate = (new Date(Date.now() + 9 * 60 * 60 * 1000)).toISOString().replace(/\.\d+Z$/, "");
6667
if (compareVersion(setting_version) < 0) {
6768
console.log(`新しい設定ファイル形式(バージョン${setting_version})のため、本プログラム(バージョン${version})では処理できません\n新しいプログラムに置き換えてください。`);

0 commit comments

Comments
 (0)