protected function detectLatestDeployedVersion()

in src/Utils/Flex/FlexExecCommand.php [250:269]


    protected function detectLatestDeployedVersion(
        $service,
        InputInterface $input,
        OutputInterface $output
    ) {
        list($_, $cmdOutput) = $this->gcloud->exec(
            [
                'app',
                'versions',
                'list',
                "--service=$service",
                '--format=get(version.id)',
                '--sort-by=~version.createTime',
                '--limit=1'
            ]
        );
        if (!empty($cmdOutput)) {
            return preg_split('/\s+/', $cmdOutput[0])[0];
        }
    }