feat: get jobConfig to SNAPSHOTS
This commit is contained in:
@@ -9,7 +9,7 @@ if (!version) {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = `https://downloads.openwrt.org/releases/${version}/targets/`;
|
const url = version === 'SNAPSHOT' ? 'https://downloads.openwrt.org/snapshots/targets/' : `https://downloads.openwrt.org/releases/${version}/targets/`;
|
||||||
|
|
||||||
async function fetchHTML(url) {
|
async function fetchHTML(url) {
|
||||||
try {
|
try {
|
||||||
@@ -54,7 +54,7 @@ async function getDetails(target, subtarget) {
|
|||||||
$('a').each((index, element) => {
|
$('a').each((index, element) => {
|
||||||
const name = $(element).attr('href');
|
const name = $(element).attr('href');
|
||||||
if (name && name.startsWith('kernel_')) {
|
if (name && name.startsWith('kernel_')) {
|
||||||
const vermagicMatch = name.match(/kernel_5\.\d+\.\d+-\d+-([a-f0-9]+)_([a-zA-Z0-9_-]+)\.ipk$/);
|
const vermagicMatch = name.match(/kernel_\d+\.\d+\.\d+(?:-\d+)?[-~]([a-f0-9]+)(?:-r\d+)?_([a-zA-Z0-9_-]+)\.ipk$/);
|
||||||
if (vermagicMatch) {
|
if (vermagicMatch) {
|
||||||
vermagic = vermagicMatch[1];
|
vermagic = vermagicMatch[1];
|
||||||
pkgarch = vermagicMatch[2];
|
pkgarch = vermagicMatch[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user