diff --git a/.env.example b/.env.example index d049a24..6b66104 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,6 @@ APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost -APP_VERSION=v2.1.0 APP_LOCALE=en APP_FALLBACK_LOCALE=en diff --git a/config/app.php b/config/app.php index e441955..9f643c0 100644 --- a/config/app.php +++ b/config/app.php @@ -15,7 +15,10 @@ 'name' => env('APP_NAME', 'Laravel'), - 'version' => env('APP_VERSION', 'v2.1.0'), + 'version' => env('APP_VERSION') + ?: (file_exists(base_path('version.txt')) ? trim((string) file_get_contents(base_path('version.txt'))) : null) + ?: trim((string) @exec('git describe --tags --abbrev=0 2>/dev/null')) + ?: 'v2.5.0', /* |--------------------------------------------------------------------------