decoderman / amtm

amtm - the Asuswrt-Merlin Terminal Menu
https://diversion.ch/amtm.html
GNU General Public License v3.0
175 stars 12 forks source link

Update amtm #18

Closed Martinski4GitHub closed 8 months ago

Martinski4GitHub commented 8 months ago

Added/modified code to show a more "complete" version string of the F/W currently installed on the router. The function to get the F/W version string can return the "long" version (e.g. "3004.386.12.4") or the "short" version (e.g ."386.12_4"). Either one would be fine, IMO, although the long version is more informative.

See this SNBForum post for further details & some screenshots:

https://www.snbforums.com/threads/amtm-4-2-the-asuswrt-merlin-terminal-menu-released-january-13-2024.79665/page-13#post-885623

decoderman commented 8 months ago

Thanks for bringing this up. I will review your proposed request, see also my reply on SNB Forums. I can agree on adding the the short extra version number, be it .betaX, .0 or as in your case .4. If your happy with that I'll just ad the NVRAM variable instead of merging tyour pull request.

Martinski4GitHub commented 8 months ago

I can agree on adding the the short extra version number, be it .betaX, .0 or as in your case .4. If your happy with that I'll just ad the NVRAM variable instead of merging tyour pull request.

Yeah, that's fine. The short version string (e.g. "386.12_4") would be OK as it contains sufficient information to distinguish the different patch releases.

Note that for the most recent "388.xx" F/W releases, RMerlin has started to use the long version format (e.g. "3004_388.5_0") when naming the F/W image files and in the changelogs, so I thought that since AMTM is part of the F/W, you would be following the same format to be consistent across the board; but again, I don't know what s/w standards & release requirements you both have agreed to so that was just my assumption based on what I'm used to work with as a s/w developer.

decoderman commented 8 months ago

RMerlin has started to use the long version format (e.g. "3004_388.5_0") when naming the F/W image files

You are correct, RMerlin decided to now include the base version string to get in line with Asus's own naming scheme. In previous versions this was omitted.

I guess I should respect his decision and likewise use it in amtm. But I have to figure out how to omit the base version for firmware older than when RMerlin started using it. I have not looked at the NVRAM variable but it likely will be a variable that's not populated or not present for these older releases. I'll figure it out.

decoderman commented 8 months ago

Note that I merged your request, the actual code and version number however will differ when released. I have decided to now only use Major.Minor version numbers for amtm and Diversion. Also, the files are pulled and served from diversion.ch, for amtm and Diversion (which is not published to GitHub for my own personal reasons). amtm is published here because it is part of the Asuswrt-Merlin Firmware and RMerlin requested I do so for accountability.

Martinski4GitHub commented 8 months ago

Note that the function I wrote can be modified to return the long or short version based on the major version being 388. See PR #20 which I just submitted as an example of a possible solution.

The function also takes care of the scenario where the NVRAM variable does not exist or is not populated.