Re: [PATCH yocto-autobuilder-helper] run-docs-build: build from tags dynamically instead of static list
Nicolas Dechesne <nicolas.dechesne@...>
On Wed, Apr 7, 2021 at 9:31 AM Quentin Schulz <foss@...> wrote:
Thanks for starting this!
sort -V is even better since it does "natural sort of (version) numbers within text", let's get ready for 3.10 ;)
And using -V, how about something along these lines:
for v in $(git tag --list 'yocto-*'); do
first=$(printf '%s\n%s' $v $v_sphinx | sort -V | head -n1)
if [ "$first" = "$v_sphinx" ]; then
echo "Yocto $v uses Sphinx!"
and it outputs the following when I run it locally:
Yocto yocto-3.1.5 uses Sphinx!
Yocto yocto-3.1.6 uses Sphinx!
Yocto yocto-3.2 uses Sphinx!
Yocto yocto-3.2.1 uses Sphinx!
Yocto yocto-3.2.2 uses Sphinx!
Yocto yocto-3.2.3 uses Sphinx!
would be doing the same thing as the one command with grep above.
It is bash already.