`./script.sh get-latest <offset>` gets the full list of tags, filters it, sorts it then returns a single result. On the Python side, it gets the first one. If that works, it uses it, else it tries the second one, etc. That is a weird implementation: modify get-latest to return all tags so that Python code only has to spawn a single subprocess. Also, rename it from `get-latest` to `get-latest-tags`. This makes things more explicit (what latest?) and also explicits that more than one tag is required. Also, argument 1 is supposed to be an offset. No custom implementation of get_latest() did implement that. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
21 lines
365 B
Bash
21 lines
365 B
Bash
# Elixir definitions for Mesa
|
|
|
|
list_tags()
|
|
{
|
|
echo "$tags" |
|
|
tac |
|
|
grep ^mesa-[0-9]*[\.][0-9]*
|
|
}
|
|
|
|
list_tags_h()
|
|
{
|
|
echo "$tags" |
|
|
grep ^mesa-[0-9]*[\.][0-9]* |
|
|
tac |
|
|
sed -r 's/^mesa-([0-9]*)(\.[0-9]*)(.*)$/v\1 v\1\2 mesa-\1\2\3/'
|
|
}
|
|
|
|
get_latest_tags()
|
|
{
|
|
git tag | version_dir | grep ^mesa-[0-9]*[\.][0-9]* | grep -v '\-rc' | sort -Vr
|
|
}
|