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

Commit 2269a689 authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Merge branch '186-send-preversion-tag' into 'master'

Adding preversion support to json answer

See merge request !37
parents 8dc206df de627e04
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@
            $this->apiLevel = $this->getBuildPropValue('ro.build.version.sdk') ?? '';
            $this->model = $this->getBuildPropValue('ro.lineage.device') ?? $this->getBuildPropValue('ro.cm.device') ?? ($tokens[1] == 'cm' ? $tokens[9] : $tokens[8]);
            $this->version = $tokens[2];
            $this->preversion = $tokens[3];
            $this->displayVersion = $this->getBuildPropValue('ro.cm.display.version') ?? $this->getBuildPropValue('ro.lineage.display.version') ?? '';
            $this->androidVersion = $this->getBuildPropValue('ro.build.version.release') ?? '';
            $this->uid = hash('sha256', $this->timestamp.$this->model.$this->apiLevel, false);
@@ -349,6 +350,15 @@
            return $this->version;
        }

        /**
         * Get the preversion of the current build (alpha, beta.3, etc)
         * @return string the preversion value
         */
        public function getPreversion()
        {
            return $this->preversion;
        }

        /**
         * Get the version of the current build
         * @return string the version value
+2 −1
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@
                    'romtype' => $build->getChannel(),
                    'datetime' => $build->getTimestamp(),
                    'version' => $build->getVersion(),
                    'pre_version' => $build->getPreversion(),
                    'display_version' => $build->getDisplayVersion(),
                    'android_version' => $build->getAndroidVersion(),
                    'id' => $build->getUid(),