How to find the latest release from script

Is there a way to find the latest release version (now it is 19.07.3) or a link to it (https://downloads.openwrt.org/releases/19.07.3/) ?

It sounds like you just need to know the target for your device? If so, enter the model here, click on View/Edit Data of your model and then look for target in your devices Dataentry.

It sounds like you just need to know the target for your device?

Why is sounds so?

Even if you're right, how to

click

from script?

curl -s "https://downloads.openwrt.org/releases/" | grep href | grep -v '(root)' | grep -v KeyCDN | grep -v faillogs | grep -v 'packages-' | sed s/'<\/a>.*'/''/ | sed s/'<tr><td class="n">'/''/ | cut -d'>' -f2 | grep -v '\-rc' | sort | tail -n1

I'd prefer to curl --silent https://api.github.com/repos/openwrt/openwrt/releases/latest | jq --raw-output .tag_name (doesn't work) or something like

mkdir o
cd o
git init
git remote add origin https://git.openwrt.org/openwrt/openwrt.git
git ls-remote ...

but these solutions looks ugly, especially yours pipeline.

Should openwrt provide https://downloads.openwrt.org/releases/latest link?

2 Likes