feat(update-script): add option to semd output to file
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
e9d02bdf36
commit
5df12e27fb
1 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { spawnSync } from 'node:child_process';
|
import { spawnSync } from 'node:child_process';
|
||||||
|
import { writeFileSync } from 'node:fs';
|
||||||
|
|
||||||
import { parseArgs } from './lib.ts';
|
import { parseArgs } from './lib.ts';
|
||||||
import { updateFirefoxAddons } from '././firefox.ts';
|
import { updateFirefoxAddons } from '././firefox.ts';
|
||||||
|
@ -58,13 +59,20 @@ if (args['a'] || args['all']) {
|
||||||
stdio: [process.stdin, process.stdout, process.stderr],
|
stdio: [process.stdin, process.stdout, process.stderr],
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log([
|
const output = [
|
||||||
'chore: update flake.lock',
|
'chore: update flake.lock',
|
||||||
`Flake Inputs:\n${flakeOutput}`,
|
`Flake Inputs:\n${flakeOutput}`,
|
||||||
`Docker Images:\n${dockerOutput}`,
|
`Docker Images:\n${dockerOutput}`,
|
||||||
`Firefox Addons:\n${firefoxOutput}`,
|
`Firefox Addons:\n${firefoxOutput}`,
|
||||||
`Misc Sources:\n${vuetorrentOutput}`,
|
`Misc Sources:\n${vuetorrentOutput}`,
|
||||||
].join('\n\n'));
|
].join('\n\n');
|
||||||
|
|
||||||
|
if (args['f']) {
|
||||||
|
writeFileSync(args['f'] as string, output);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log(output);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnSync('alejandra', ['-q', FLAKE], { shell: true });
|
spawnSync('alejandra', ['-q', FLAKE], { shell: true });
|
||||||
|
|
Loading…
Reference in a new issue