Re: [Q] Getting the latest available Linux-kernel version (v3.x.y-stable or v3.x.y-rcX)?
- From
- Sedat Dilek <sedat.dilek@gmail.com>
- Date
- Jul 2, 2013, 09:05 UTC
- Message-ID
- <CA+icZUUMjKx2J+Q4xKc6QkiSQB71szVjZNURhkpLFMGjqgpqRw@mail.gmail.com>
- In-Reply-To
- <CALkWK0nj3BG0VCxkzack_9sHa8oo=aypuv6KRusdRKyO1JCkAw@mail.gmail.com>
On Tue, Jul 2, 2013 at 10:46 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 11 quoted lines
> Sedat Dilek wrote: >> for my Linux-kernel build-script I am searching for a reliable check >> of getting the ***latest*** version. > > $ git describe HEAD > > If you want a sorted list of tags, > > $ git for-each-ref --sort=taggerdate --format="%(refname:short)" refs/tags > > Are you looking for something else?
Hi Ramukar,
Thanks for the quick answer!
Cool, this seems to keep version-chronology!
$ git for-each-ref --sort=taggerdate --format="%(refname:short)" refs/tags | grep ^'v3.[0-9]*' | tail -1 v3.10
$ git for-each-ref --sort=taggerdate --format="%(refname:short)" refs/tags | grep ^'next-[0-9]*' | tail -1 next-20130702
Another question if I may ask:
Sometimes I need to bisect a previous Linux-Next version.
What I am doing is to have the latest Linux-v3.x.y(-rcX) as stable base.
$ git checkout upstream $ git checkout -b Linux-v3.10-rc7 v3.10-rc7
Afterwards I checkout the latest Linux-Next remote repository with all its (new) tags (here: next-20130628)
$ git checkout -b Linux-Next-v20130628 $ git pull linux-next --tags next-20130628
How do I get the latest available linux-version in the downgraded (current) Linux-Next local repository (example: I have parallelly Linux-Next-v20130702 and Linux-Next-v20130628)? If I have all -next tags merged-in, I will get always today's 'next-20130702'. Due to my poor git skillz I do this manually for git-bisect sessions.
Thanks again, you helped me a lot with the above!
- Sedat -