mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 15:44:11 -08:00
Merge remote-tracking branch 'origin/develop'
# Conflicts: # config/version.php # resources/views/account/view-assets.blade.php
This commit is contained in:
commit
4df53bdf8d
|
@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -584,7 +584,7 @@
|
|||
|
||||
<footer class="main-footer">
|
||||
<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-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>
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
<tr>
|
||||
<td class="col-md-4">{{ trans('admin/settings/general.snipe_version') }}</td>
|
||||
<td class="col-md-8">
|
||||
{{ config('version.hash_version') }}
|
||||
{{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -405,7 +405,7 @@
|
|||
@if (($log->item) && ($log->itemType()=="asset"))
|
||||
<a href="{{ route('view/hardware', $log->item_id) }}">{{ $log->item->asset_tag }} - {{ $log->item->showAssetName() }}</a>
|
||||
@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
|
||||
{{ trans('general.bad_data') }}
|
||||
@endif
|
||||
|
|
Loading…
Reference in a new issue