protected function askBuildVersion()
    {
        $last_version = $this->gitLatestVersionTag();
        $next_version = $this->incrementVersion($last_version);

        $question = (new Question("Set build version [{$next_version}]: ", $next_version))
            ->setValidator(function ($input_version) use ($last_version) {
                $input_version = trim($input_version);

                if (version_compare($input_version, $last_version, '==')) {
                    throw new \RuntimeException(
                        'Build version has already been used.'
                    );
                }

                if (!$this->isVersionNumeric($input_version)) {
                    throw new \RuntimeException(
                        'Build version is not numeric.'
                    );
                }

                return $input_version;
            });

        return $this->doAsk($question);
    }
protected function askBuildVersion()
    {
        $last_version = $this->gitLatestVersionTag();
        $next_version = $this->incrementVersion($last_version);

        $question = (new Question("Set build version [{$next_version}]: ", $next_version))
            ->setValidator(function ($input_version) use ($last_version) {
                $input_version = trim($input_version);

                if (version_compare($input_version, $last_version, '==')) {
                    throw new \RuntimeException(
                        'Build version has already been used.'
                    );
                }

                if (!$this->isVersionNumeric($input_version)) {
                    throw new \RuntimeException(
                        'Build version is not numeric.'
                    );
                }

                return $input_version;
            });

        return $this->doAsk($question);
    }
protected function askBuildVersion ( ) { $ last_version = $ this -> gitLatestVersionTag ( ) ; $ next_version = $ this -> incrementVersion ( $ last_version ) ; $ question = ( new Question ( "Set build version [{$next_version}]: " , $ next_version ) ) -> setValidator ( function ( $ input_version ) use ( $ last_version ) { $ input_version = trim ( $ input_version ) ; if ( version_compare ( $ input_version , $ last_version , '==' ) ) { throw new \ RuntimeException ( 'Build version has already been used.' ) ; } if ( ! $ this -> isVersionNumeric ( $ input_version ) ) { throw new \ RuntimeException ( 'Build version is not numeric.' ) ; } return $ input_version ; } ) ; return $ this -> doAsk ( $ question ) ; }
Ask build version.

@return string
Ask build version .