From 1ae537b572b15efa8a005d8caf3420d76e1250b1 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sat, 30 Nov 2024 20:53:06 -0500 Subject: [PATCH] feat(update): clean up flake inputs log --- apps/update-sources/src/flake.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/update-sources/src/flake.ts b/apps/update-sources/src/flake.ts index dced812c..38e3fe03 100644 --- a/apps/update-sources/src/flake.ts +++ b/apps/update-sources/src/flake.ts @@ -27,8 +27,14 @@ export const updateFlakeInputs = () => { // Shorten git revs to help readability .split('\n') .map((l) => l - .replace(/.{33}\?narHash=sha256[^']*/, '') - .replace(/&rev=(.{7})[^'&]*/, (_, backref) => `&rev=${backref}`)) + .replace( + /\/(.{40})\?narHash=sha256[^']*(.*)/, + (_, backref1, backref2) => `${backref2} rev: ${backref1}`, + ) + .replace( + /\?ref.*&rev=(.{40})[^'&]*(.*)/, + (_, backref1, backref2) => `${backref2} rev: ${backref1}`, + )) .join('\n'); return output;