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