Commit 81a03c2d authored by Vitaly Lipatov's avatar Vitaly Lipatov

tests/update_versions.sh: prioritize apps with missing or oldest logs

parent d5026442
...@@ -86,8 +86,21 @@ if [ -n "$1" ] ; then ...@@ -86,8 +86,21 @@ if [ -n "$1" ] ; then
fi fi
distr="$($EPM print info -s)" distr="$($EPM print info -s)"
# install/update all # install/update all, prioritizing apps with missing or oldest logs
$EPM play $playopt --list-all --short | while read app ; do sort_apps_by_log_age()
{
local app logfile
while read app ; do
logfile="$LDIR/$app"
if [ ! -f "$logfile" ] ; then
echo "0 $app"
else
echo "$(stat -c %Y "$logfile") $app"
fi
done | sort -n | sed 's/^[^ ]* //'
}
$EPM play $playopt --list-all --short | sort_apps_by_log_age | while read app ; do
# hack for broken gitlab-runner # hack for broken gitlab-runner
[ "$distr" != "alt" ] && [ "$app" = "gitlab-runner" ] && continue [ "$distr" != "alt" ] && [ "$app" = "gitlab-runner" ] && continue
install_app_alt $app </dev/null install_app_alt $app </dev/null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment