16 protected $name =
'versioning:update';
23 protected $description =
'Generate and update app\'s version via git.';
32 parent::__construct();
44 $versionFile = app_path().
'/config/version.php';
48 $hash_version = $this->argument(
'app_version');
51 $version = explode(
'-', $hash_version);
52 $realVersion = $version[0] .
'-' . $version[1];
55 $array = var_export(array(
'app_version' => $realVersion,
'hash_version' => $hash_version),
true);
65 \File::put($versionFile, $content);
66 $this->line(
'Setting version: '. \config(
'version.latest'));
77 array(
'app_version', InputArgument::REQUIRED,
'version number is required.'),
fire()
Execute the console command.
getOptions()
Get the console command options.
__construct()
Create a new command instance.
getArguments()
Get the console command arguments.