createVersionNumber($cfg); $cfg['build']['number'] = $build_number; $c = $cfg['current']; $version = "v{$c['major']}.{$c['minor']}.{$c['patch']}-{$build_number}"; if ($this->option('write')) { file_put_contents($version_file, Yaml::dump($cfg, 4, 2)); } # Only show the major.minor.patch version if ($this->option('base-only')) { $version = 'v'.$cfg['current']['major'].'.' .$cfg['current']['minor'].'.' .$cfg['current']['patch']; } print $version."\n"; } }