mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-21 04:15:48 +00:00
feat: get jobConfig to SNAPSHOTS
This commit is contained in:
4
index.js
4
index.js
@@ -9,7 +9,7 @@ if (!version) {
|
||||
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) {
|
||||
try {
|
||||
@@ -54,7 +54,7 @@ async function getDetails(target, subtarget) {
|
||||
$('a').each((index, element) => {
|
||||
const name = $(element).attr('href');
|
||||
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) {
|
||||
vermagic = vermagicMatch[1];
|
||||
pkgarch = vermagicMatch[2];
|
||||
|
||||
Reference in New Issue
Block a user