git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[Q] Getting the latest available Linux-kernel version (v3.x.y-stable or v3.x.y-rcX)?

From
SDSedat Dilek <sedat.dilek@gmail.com>
Date
Jul 2, 2013, 08:03 UTC
Message-ID
<CA+icZUV50bn4wjohfmKWL-GXpstidPNsNWqHuq+0gvEorWOaxA@mail.gmail.com>
Hi,

for my Linux-kernel build-script I am searching for a reliable check of getting the ***latest*** version. This could be 'v3.x.y-stable' or 'v3.x.y-rcX'.

'git tag' seems to be fast, but not reliable. 'git log --oneline' is slow, but does the job.

For getting v3.x.y-stable this seems to work...

$ git tag | grep ^'v3.[0-9]*' | grep -v '\-rc' | sort --version-sort v3.0 v3.1 v3.2 v3.3 v3.4 v3.5 v3.6 v3.7 v3.8 v3.9 v3.10

...but not when listing v3.x.y-rcX, too:

$ git tag | grep ^'v3.[0-9]*' | sort --version-sort | grep ^'v3.10' v3.10 v3.10-rc1 v3.10-rc2 v3.10-rc3 v3.10-rc4 v3.10-rc5 v3.10-rc6 v3.10-rc7

I know that v3.10 > v3.10-rcX, but not 'git tag' or 'sort --version-sort' :-).
This seems from my poor sed/awk/grep skills to be the most reliable method...

$ time git log --oneline v3.0-rc1.. | grep 'Linux 3.' | awk '{ print $3 }' | grep ^'3.[0-9]*' | head -1 3.10

real 0m10.024s user 0m5.611s sys 0m4.857s

...but is slow (even I take v3.0-rc1 as the 1st version-tag of Linux-v3.x series).

Any improvements?
Thanks in advance.
Regards,
- Sedat -
Next: Ramkumar Ramachandra
Message 1 of 5 in “[Q] Getting the latest available Linux-kernel version (v3.x.y-stable or v3.x.y-rcX)?”
  1. Sedat DilekJul 2, 2013
  2. Ramkumar RamachandraJul 2, 2013
  3. Sedat DilekJul 2, 2013
  4. Ramkumar RamachandraJul 2, 2013
  5. Sedat DilekJul 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.