Skip to content

Commit 35de668

Browse files
committed
Change version handling; bump to 0.1.1-beta
1 parent c81bc37 commit 35de668

File tree

5 files changed

+67
-3
lines changed

5 files changed

+67
-3
lines changed

.env.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ MAIL_FROM=you@example.com
2323
API_PREFIX=api
2424
API_VERSION=v1
2525
API_DEBUG=false
26-
27-
APP_VERSION=0.1.0-beta
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?php
2+
/**
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
namespace Pterodactyl\Console\Commands;
25+
26+
use Illuminate\Console\Command;
27+
28+
class ShowVersion extends Command
29+
{
30+
/**
31+
* The name and signature of the console command.
32+
*
33+
* @var string
34+
*/
35+
protected $signature = 'pterodactyl:version';
36+
37+
/**
38+
* The console command description.
39+
*
40+
* @var string
41+
*/
42+
protected $description = 'Display current panel version.';
43+
44+
/**
45+
* Create a new command instance.
46+
*
47+
* @return void
48+
*/
49+
public function __construct()
50+
{
51+
parent::__construct();
52+
}
53+
54+
/**
55+
* Execute the console command.
56+
*
57+
* @return mixed
58+
*/
59+
public function handle()
60+
{
61+
$this->info('You are running Pterodactyl Panel ' . config('app.version'));
62+
}
63+
}

app/Console/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Kernel extends ConsoleKernel
1515
protected $commands = [
1616
\Pterodactyl\Console\Commands\Inspire::class,
1717
\Pterodactyl\Console\Commands\MakeUser::class,
18+
\Pterodactyl\Console\Commands\ShowVersion::class,
1819
];
1920

2021
/**

config/app.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
'env' => env('APP_ENV', 'production'),
66

7+
'version' => env('APP_VERSION', 'v0.1.1-beta'),
8+
79
/*
810
|--------------------------------------------------------------------------
911
| Application Debug Mode

resources/views/admin/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</ul>
3131
<h3 class="nopad">Pterodactyl Admin Control Panel</h3><hr />
3232
<p>Welcome to the most advanced, lightweight, and user-friendly open source game server control panel.</p>
33-
<p>You are running version <code>{{ env('APP_VERSION', 'unknown') }}</code>.</p>
33+
<p>You are running version <code>{{ config('app.version') }}</code>.</p>
3434
</div>
3535
<script>
3636
$(document).ready(function () {

0 commit comments

Comments
 (0)