Browse Source
Handle xz images in monitor-raspbian
They've changed their image extensions again
Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
change-dependabot-prefix
Ole Petter
3 years ago
No known key found for this signature in database
GPG Key ID: 399DBE0F4D4B02EB
1 changed files with
3 additions and
3 deletions
-
scripts/linkbot/monitor-raspbian-os.js
|
|
@ -35,13 +35,13 @@ function getNewRaspbian(target, url, separator) { |
|
|
|
var document = dom.window.document; |
|
|
|
var refs = document.getElementsByTagName("a"); |
|
|
|
var test = Array.from(refs) |
|
|
|
.filter((ref) => ref.textContent.match("raspios-.*-lite.*.zip$")) |
|
|
|
.filter((ref) => ref.textContent.match("raspios-.*-lite.*\.img\.(zip|xz)$")) |
|
|
|
.reduce((acc, element) => { |
|
|
|
acc.push(element.textContent.match("raspios-.*-lite.*.zip$").input); |
|
|
|
acc.push(element.textContent.match("raspios-.*-lite.*\.img\.(zip|xz)$").input); |
|
|
|
return acc; |
|
|
|
}, [])[0]; |
|
|
|
console.log(`Test var: ${test}`); |
|
|
|
const imageName = test.substring(0, test.length - 4); |
|
|
|
const imageName = test.substring(0, test.lastIndexOf('.img')); |
|
|
|
if (separator) { |
|
|
|
return { |
|
|
|
replacementLine: `${target}${separator} \"${url}/${test}\"`, |
|
|
|