mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
update does-it-build
now needs a new rust version so let's pull in the rust from 25.11 lol
This commit is contained in:
parent
343ee03765
commit
f6fb60c03a
5 changed files with 34 additions and 26 deletions
|
|
@ -1,23 +1,22 @@
|
|||
import fs from "node:fs/promises";
|
||||
|
||||
const path = `${import.meta.dirname}/nixpkgs.json`;
|
||||
const nixpkgs = JSON.parse(await fs.readFile(path));
|
||||
const channels = JSON.parse(await fs.readFile(path));
|
||||
|
||||
const res = await fetch(
|
||||
`https://api.github.com/repos/NixOS/nixpkgs/commits/${nixpkgs.channel}`
|
||||
);
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error(
|
||||
`get commit for ${name}: ${res.status} - ${await res.text()}`
|
||||
for (const [channel, nixpkgs] of Object.entries(channels)) {
|
||||
const res = await fetch(
|
||||
`https://api.github.com/repos/NixOS/nixpkgs/commits/${channel}`
|
||||
);
|
||||
if (!res.ok) {
|
||||
throw new Error(
|
||||
`get commit for ${channel}: ${res.status} - ${await res.text()}`
|
||||
);
|
||||
}
|
||||
const body = await res.json();
|
||||
if (body.sha !== nixpkgs.commit) {
|
||||
nixpkgs.commit = body.sha;
|
||||
nixpkgs.lastUpdated = new Date().toISOString();
|
||||
}
|
||||
}
|
||||
|
||||
const body = await res.json();
|
||||
|
||||
if (body.sha !== nixpkgs.commit) {
|
||||
nixpkgs.commit = body.sha;
|
||||
nixpkgs.lastUpdated = new Date().toISOString();
|
||||
|
||||
await fs.writeFile(path, JSON.stringify(nixpkgs, null, 2) + "\n");
|
||||
}
|
||||
await fs.writeFile(path, JSON.stringify(channels, null, 2) + "\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue