Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat: show development revision in debug settings
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry authored and ajsb85 committed Mar 30, 2018
1 parent c9d7db6 commit b9a330b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions inc/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ public function showFormDebug() {
-1,
['display' => false]
);
$fields['revision'] = PLUGIN_FLYVEMDM_VERSION;
if (file_exists(PLUGIN_FLYVEMDM_ROOT . '/.git') && function_exists('exec')) {
$fields['revision'] = exec('cd "' . __DIR__ . '" && git describe --tags');
}

$data = [
'config' => $fields
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function plugin_version_flyvemdm() {
'version' => PLUGIN_FLYVEMDM_VERSION,
'author' => $author,
'license' => 'AGPLv3+',
'homepage' => '',
'homepage' => 'https://flyve-mdm.com/',
'minGlpiVersion' => $glpiVersion,
'requirements' => [
'glpi' => [
Expand Down
8 changes: 8 additions & 0 deletions tpl/config-debug.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
<td>{{ config.show_wizard|raw }}</td>
<td>{{ __('Warning: if the plugin is already configured, re-running the configuration wizard may break communication with already enrolled devices.', 'flyvemdm') }}</td>
</tr>
<tr>
<th colspan="3" class="">{{ __('Revision information', 'flyvemdm') }}</th>
</tr>
<tr class="tab_bg_1">
<td>{{ __('Revision information', 'flyvemdm') }}</td>
<td>{{ config.revision }}</td>
<td></td>
</tr>
<tr class="tab_bg_1">
<td class="center" colspan="2">
<input type="hidden" name="id" value="1" class="submit">
Expand Down

0 comments on commit b9a330b

Please sign in to comment.