Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10b97067 authored by theronakpatel's avatar theronakpatel
Browse files

ci: fix version extraction for BusyBox shell; use PHP fallback

parent d96a1334
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ default:
    echo "Deriving package version from appinfo/info.xml ..."
    RAW_VERSION=$(xmllint --xpath 'string(/info/version)' appinfo/info.xml 2>/dev/null || true)
    if [ -z "${RAW_VERSION:-}" ]; then
      RAW_VERSION=$(grep -oP '<version>\K[^<]+' appinfo/info.xml | head -n1 || true)
      RAW_VERSION=$(php -r '$x=@simplexml_load_file("appinfo/info.xml"); if(!$x||empty($x->version)){exit(1);} echo $x->version, PHP_EOL;' 2>/dev/null || true)
    fi
    if [ -z "${RAW_VERSION:-}" ]; then
      echo "Could not extract version from appinfo/info.xml" >&2