parent
970a380805
commit
60bc645ae0
5 changed files with 73 additions and 33 deletions
apps/update/src
21
apps/update/src/misc.ts
Normal file
21
apps/update/src/misc.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { readdirSync } from 'node:fs';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
|
||||
|
||||
/* Constants */
|
||||
const FLAKE = process.env.FLAKE;
|
||||
|
||||
export const updateDocker = () => {
|
||||
let updates = '';
|
||||
|
||||
const FILE = `${FLAKE}/devices/nos/modules/arion`;
|
||||
|
||||
readdirSync(FILE, { withFileTypes: true, recursive: true }).forEach((path) => {
|
||||
if (path.name === 'compose.nix') {
|
||||
updates += spawnSync('updateImages', [path.parentPath], { shell: true })
|
||||
.stdout.toString();
|
||||
}
|
||||
});
|
||||
|
||||
return updates;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue