Re: [PATCH yocto-autobuilder-helper] run-docs-build: build from tags dynamically instead of static list
Nicolas Dechesne <nicolas.dechesne@...>
hey! On Wed, Apr 7, 2021 at 9:31 AM Quentin Schulz <foss@...> wrote: Hi Michael, 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: v_sphinx='yocto-3.1.5' 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!" fi done 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. yes.
It is bash already.
|
|