feat(upScript): don't show empty sections
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
6f8e392817
commit
e3d58da310
1 changed files with 17 additions and 8 deletions
|
@ -75,18 +75,27 @@ if (args['a'] || args['all']) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const output = [
|
const output = [
|
||||||
'chore: update flake.lock\n',
|
'chore: update sources\n\n',
|
||||||
`Flake Inputs:\n${flakeOutput}\n`,
|
];
|
||||||
`Docker Images:\n${dockerOutput}`,
|
|
||||||
`Firefox Addons:\n${firefoxOutput}\n`,
|
if (flakeOutput.length > 5) {
|
||||||
`Misc Sources:\n${vuetorrentOutput}\n`,
|
output.push(`Flake Inputs:\n${flakeOutput}\n\n`);
|
||||||
].join('\n');
|
}
|
||||||
|
if (dockerOutput.length > 5) {
|
||||||
|
output.push(`Docker Images:\n${dockerOutput}\n`);
|
||||||
|
}
|
||||||
|
if (firefoxOutput.length > 5) {
|
||||||
|
output.push(`Firefox Addons:\n${firefoxOutput}\n\n`);
|
||||||
|
}
|
||||||
|
if (vuetorrentOutput.length > 5) {
|
||||||
|
output.push(`Misc Sources:\n${vuetorrentOutput}\n`);
|
||||||
|
}
|
||||||
|
|
||||||
if (args['f']) {
|
if (args['f']) {
|
||||||
writeFileSync(args['f'] as string, output);
|
writeFileSync(args['f'] as string, output.join(''));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log(output);
|
console.log(output.join(''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue