fix(update): get latest tag instead of release for grosshack
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
853552493f
commit
1c8b80283e
3 changed files with 19 additions and 9 deletions
|
@ -1,8 +1,10 @@
|
|||
{
|
||||
buildApp,
|
||||
callPackage,
|
||||
curl,
|
||||
findutils,
|
||||
go,
|
||||
jq,
|
||||
nix-update,
|
||||
nodejs_latest,
|
||||
prefetch-npm-deps,
|
||||
|
@ -13,8 +15,10 @@ buildApp {
|
|||
npmDepsHash = "sha256-2cWxVTCOEJOg2eBv+xX/mvr6MUX+UJQ8JlkoObD6+Uc=";
|
||||
|
||||
runtimeInputs = [
|
||||
curl
|
||||
findutils
|
||||
go
|
||||
jq
|
||||
nix-update
|
||||
nodejs_latest
|
||||
prefetch-npm-deps
|
||||
|
|
|
@ -67,10 +67,12 @@ const main = async() => {
|
|||
console.log(await updateNodeModules());
|
||||
}
|
||||
|
||||
// TODO: get latest tag instead of release
|
||||
// if (args['p'] || args['pam-fprint-grosshack']) {
|
||||
// console.log(runNixUpdate('pam-fprint-grosshack'));
|
||||
// }
|
||||
if (args['p'] || args['pam-fprint-grosshack']) {
|
||||
console.log(runNixUpdate(
|
||||
'pam-fprint-grosshack',
|
||||
['--version="$(curl -s https://gitlab.com/api/v4/projects/mishakmak%2Fpam-fprint-grosshack/repository/tags | jq -r .[0].name)"'],
|
||||
));
|
||||
}
|
||||
|
||||
if (args['ph'] || args['protonhax']) {
|
||||
console.log(runNixUpdate('protonhax'));
|
||||
|
@ -129,8 +131,8 @@ const main = async() => {
|
|||
// nix-update executions
|
||||
let nixUpdateOutputs = '';
|
||||
|
||||
const updatePackage = (pkg: string): void => {
|
||||
const execution = runNixUpdate(pkg);
|
||||
const updatePackage = (pkg: string, opts: string[] = []): void => {
|
||||
const execution = runNixUpdate(pkg, opts);
|
||||
|
||||
nixUpdateOutputs += execution.stdout;
|
||||
console.log(execution.stderr);
|
||||
|
@ -139,7 +141,10 @@ const main = async() => {
|
|||
|
||||
updatePackage('homepage');
|
||||
updatePackage('jmusicbot');
|
||||
// updatePackage('pam-fprint-grosshack');
|
||||
updatePackage(
|
||||
'pam-fprint-grosshack',
|
||||
['--version="$(curl -s https://gitlab.com/api/v4/projects/mishakmak%2Fpam-fprint-grosshack/repository/tags | jq -r .[0].name)"'],
|
||||
);
|
||||
updatePackage('protonhax');
|
||||
updatePackage('trash-d');
|
||||
updatePackage(
|
||||
|
|
|
@ -59,8 +59,9 @@ export const runNixUpdate = (
|
|||
const OLD_VERSION = getAttrVersion(attr);
|
||||
|
||||
const execution = spawnSync(
|
||||
`nix-update --flake ${attr} --write-commit-message >(head -n 1 -) > /dev/null`,
|
||||
options,
|
||||
`nix-update --flake ${attr} ${options
|
||||
.join(' ')} --write-commit-message >(head -n 1 -) > /dev/null`,
|
||||
[],
|
||||
{ shell: true, cwd: FLAKE },
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue