Closed efahl closed 3 months ago
@dangowrt
Behavior implemented as of https://github.com/efahl/owut/blob/286d7940d962ab28441619d467ac4443644993c7/files/owut#L880
User specifies --version-to
explicitly
If the user specifies a full version, then the input is checked against the available versions and left untouched:
--version-to 23.05.3
-> 23.05.3
--version-to 23.05.0-rc2
-> 23.05.0-rc2
--version-to 23.05-snapshot
-> 23.05-SNAPSHOT
--version-to snapshot
-> SNAPSHOT
If user specifies only a branch, then the "version-to" is set to the latest on that branch:
--version-to 23.05
-> 23.05.3
--version-to SNAPSHOT
-> SNAPSHOT
No --version-to
is specified
If the user does not specify a "version-to" value, then the default behavior is now to stay on the installed branch, i.e., grab the branch from the installed version and set "version-to" to the latest on the branch:
installed 23.05.0-rc1
-> 23.05.3
installed 21.02.2
-> 21.02.7
The exception to this is if the installed version is a release or main snapshot, in which case, "version-to" is set to the installed version:
installed 22.03-SNAPSHOT
-> 22.03-SNAPSHOT
installed SNAPSHOT
-> SNAPSHOT
Tested on many versions, final update in https://github.com/efahl/owut/commit/9108cde48797807ba39b220794fe0da844a686e1
https://github.com/openwrt/packages/pull/24324#issuecomment-2148595500 item 5