Merge remote-tracking branch 'origin/develop'

# Conflicts:
#	config/version.php
#	resources/views/account/view-assets.blade.php
This commit is contained in:
snipe 2016-12-01 06:10:50 -08:00
commit 4df53bdf8d
4 changed files with 14 additions and 16 deletions

View file

@ -40,20 +40,19 @@ class Versioning extends Command
*/ */
public function fire() public function fire()
{ {
// Path to the file containing your version
// This will be overwritten everything you commit a message
$versionFile = 'config/version.php'; $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');
// discard the commit hash
$version = explode('-', $hash_version); $version = explode('-', $hash_version);
$realVersion = $version[0];
// save the version array to a variable $array = var_export(
$array = var_export(array('app_version' => $realVersion,'hash_version' => $hash_version), true); array(
'app_version' => $version[0],
'build_version' => $version[1],
'hash_version' => $version[2],
'full_hash' => $hash_version),
true);
// Construct our file content // Construct our file content
@ -64,7 +63,7 @@ CON;
// And finally write the file and output the current version // And finally write the file and output the current version
\File::put($versionFile, $content); \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() protected function getArguments()
{ {
return array( return array(
array('app_version', InputArgument::REQUIRED, 'version number is required.'),
); );
} }

View file

@ -584,7 +584,7 @@
<footer class="main-footer"> <footer class="main-footer">
<div class="pull-right hidden-xs"> <div class="pull-right hidden-xs">
<b>Version</b> {{ config('version.hash_version') }} <b>Version</b> {{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
<a target="_blank" class="btn btn-default btn-xs" href="https://snipe-it.readme.io">Documentation</a> <a target="_blank" class="btn btn-default btn-xs" href="https://snipe-it.readme.io">Documentation</a>
<a target="_blank" class="btn btn-default btn-xs" href="https://snipe-it-manual.readme.io">User's Manual</a> <a target="_blank" class="btn btn-default btn-xs" href="https://snipe-it-manual.readme.io">User's Manual</a>
<a target="_blank" class="btn btn-default btn-xs" href="https://snipeitapp.com/support/">Report a Bug</a> <a target="_blank" class="btn btn-default btn-xs" href="https://snipeitapp.com/support/">Report a Bug</a>

View file

@ -210,7 +210,7 @@
<tr> <tr>
<td class="col-md-4">{{ trans('admin/settings/general.snipe_version') }}</td> <td class="col-md-4">{{ trans('admin/settings/general.snipe_version') }}</td>
<td class="col-md-8"> <td class="col-md-8">
{{ config('version.hash_version') }} {{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -405,7 +405,7 @@
@if (($log->item) && ($log->itemType()=="asset")) @if (($log->item) && ($log->itemType()=="asset"))
<a href="{{ route('view/hardware', $log->item_id) }}">{{ $log->item->asset_tag }} - {{ $log->item->showAssetName() }}</a> <a href="{{ route('view/hardware', $log->item_id) }}">{{ $log->item->asset_tag }} - {{ $log->item->showAssetName() }}</a>
@elseif ($log->item) @elseif ($log->item)
<a href="{{ route('view/'. $log->itemType(), $log->item_id) }}">{{ $log->item->name }}</a <a href="{{ route('view/'. $log->itemType(), $log->item_id) }}">{{ $log->item->name }}</a>
@else @else
{{ trans('general.bad_data') }} {{ trans('general.bad_data') }}
@endif @endif