feat(update): add homepage update script
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
1169c4d9db
commit
a818cbd3d4
3 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
buildApp,
|
buildApp,
|
||||||
callPackage,
|
callPackage,
|
||||||
|
nix-update,
|
||||||
nodejs_latest,
|
nodejs_latest,
|
||||||
prefetch-npm-deps,
|
prefetch-npm-deps,
|
||||||
...
|
...
|
||||||
|
@ -10,6 +11,7 @@ buildApp {
|
||||||
npmDepsHash = "sha256-vIhR/+Pgj35sv/ZX1iL+xWheu6w7vQeJy4OEfa8tXFw=";
|
npmDepsHash = "sha256-vIhR/+Pgj35sv/ZX1iL+xWheu6w7vQeJy4OEfa8tXFw=";
|
||||||
|
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
|
nix-update
|
||||||
nodejs_latest
|
nodejs_latest
|
||||||
prefetch-npm-deps
|
prefetch-npm-deps
|
||||||
(callPackage ../../modules/docker/updateImage.nix {})
|
(callPackage ../../modules/docker/updateImage.nix {})
|
||||||
|
|
|
@ -6,9 +6,14 @@ import { parseArgs } from './lib';
|
||||||
import { updateDocker } from './docker';
|
import { updateDocker } from './docker';
|
||||||
import { updateFirefoxAddons } from '././firefox';
|
import { updateFirefoxAddons } from '././firefox';
|
||||||
import { updateFlakeInputs } from './flake';
|
import { updateFlakeInputs } from './flake';
|
||||||
import { updateCustomPackage, updateVuetorrent } from './misc';
|
|
||||||
import updateNodeModules from './node-modules';
|
import updateNodeModules from './node-modules';
|
||||||
|
|
||||||
|
import {
|
||||||
|
runNixUpdate,
|
||||||
|
updateCustomPackage,
|
||||||
|
updateVuetorrent,
|
||||||
|
} from './misc';
|
||||||
|
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
const FLAKE = process.env.FLAKE;
|
const FLAKE = process.env.FLAKE;
|
||||||
|
@ -51,6 +56,10 @@ const main = async() => {
|
||||||
console.log(await updateNodeModules());
|
console.log(await updateNodeModules());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args['h'] || args['homepage']) {
|
||||||
|
console.log(runNixUpdate('homepage'));
|
||||||
|
}
|
||||||
|
|
||||||
if (args['a'] || args['all']) {
|
if (args['a'] || args['all']) {
|
||||||
// Update this first because of nix run cmd
|
// Update this first because of nix run cmd
|
||||||
const firefoxOutput = updateFirefoxAddons();
|
const firefoxOutput = updateFirefoxAddons();
|
||||||
|
@ -83,6 +92,7 @@ const main = async() => {
|
||||||
'scopedPackages.x86_64-linux.lovelace-components.custom-sidebar',
|
'scopedPackages.x86_64-linux.lovelace-components.custom-sidebar',
|
||||||
));
|
));
|
||||||
console.log(updateCustomPackage('some-sass-language-server'));
|
console.log(updateCustomPackage('some-sass-language-server'));
|
||||||
|
console.log(runNixUpdate('homepage'));
|
||||||
|
|
||||||
|
|
||||||
spawnSync('nixFastBuild', [], {
|
spawnSync('nixFastBuild', [], {
|
||||||
|
|
|
@ -45,3 +45,9 @@ export const updateCustomPackage = (pkg: string) => spawnSync(
|
||||||
[],
|
[],
|
||||||
{ shell: true },
|
{ shell: true },
|
||||||
).stderr.toString();
|
).stderr.toString();
|
||||||
|
|
||||||
|
export const runNixUpdate = (attr: string, options: string[] = []) => spawnSync(
|
||||||
|
'nix-update',
|
||||||
|
['--flake', attr, ...options],
|
||||||
|
{ shell: true, cwd: FLAKE },
|
||||||
|
).stderr.toString();
|
||||||
|
|
Loading…
Reference in a new issue