From 1be22cf05191e08d39e2a18beb5b723293e3b4bc Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 1 Dec 2016 02:53:41 -0800 Subject: [PATCH 01/14] Improved versioning script --- app/Console/Commands/Versioning.php | 24 +++++++++++------------ config/version.php | 4 +++- resources/views/layouts/default.blade.php | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/Console/Commands/Versioning.php b/app/Console/Commands/Versioning.php index de0ac022ab..91f1d93d3e 100644 --- a/app/Console/Commands/Versioning.php +++ b/app/Console/Commands/Versioning.php @@ -40,20 +40,19 @@ class Versioning extends Command */ public function fire() { - // Path to the file containing your version - // This will be overwritten everything you commit a message + $versionFile = 'config/version.php'; + $hash_version = str_replace("\n",'',shell_exec('git describe --tags')); - // The git's output - // get the argument passed in the git command - $hash_version = $this->argument('app_version'); + $version = explode('-', $hash_version); - // discard the commit hash - $version = explode('-', $hash_version); - $realVersion = $version[0]; - - // save the version array to a variable - $array = var_export(array('app_version' => $realVersion,'hash_version' => $hash_version), true); + $array = var_export( + array( + 'app_version' => $version[0], + 'build_version' => $version[1], + 'hash_version' => $version[2], + 'full_hash' => $hash_version), + true); // Construct our file content @@ -64,7 +63,7 @@ CON; // And finally write the file and output the current version \File::put($versionFile, $content); - $this->line('Setting version: '. \config('version.latest')); + $this->line('Setting version: '. config('version.app_version').' build '.config('version.build_version').' ('.config('version.hash_version').')'); } /** @@ -75,7 +74,6 @@ CON; protected function getArguments() { return array( - array('app_version', InputArgument::REQUIRED, 'version number is required.'), ); } diff --git a/config/version.php b/config/version.php index 93fd0611ce..38e96f24cc 100644 --- a/config/version.php +++ b/config/version.php @@ -1,5 +1,7 @@ 'v3.6.0', - 'hash_version' => 'v3.6.0-67-g7ccef51', + 'build_version' => '68', + 'hash_version' => 'ge62f3f9', + 'full_hash' => 'v3.6.0-68-ge62f3f9', ); \ No newline at end of file diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index a621a7bb8f..acb53a8cfe 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -584,7 +584,7 @@