From 1a6e9f43e835d3e7a52da4a7caea97faeb67ecef Mon Sep 17 00:00:00 2001 From: mercury Date: Sun, 22 Dec 2024 18:25:54 +0400 Subject: [PATCH] show branch --- app/bot.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/bot.php b/app/bot.php index 753f749..1cac74a 100644 --- a/app/bot.php +++ b/app/bot.php @@ -4007,9 +4007,10 @@ DNS-over-HTTPS with IP: { $conf = $this->getPacConf(); $domain = $conf['domain'] ?: $this->ip; - $update = exec('git -C / rev-list --count HEAD..@{u}'); $hash = $this->getHashBot(); if ($type == false) { + $update = exec('git -C / rev-list --count HEAD..@{u}'); + $branch = exec('git -C / rev-parse --abbrev-ref HEAD'); $backup = array_filter(explode('/', $conf['backup'])); if (!empty($backup)) { if (!empty(strtotime($backup[0])) && !empty(strtotime($backup[1]))) { @@ -4021,7 +4022,7 @@ DNS-over-HTTPS with IP: $cron = $this->dontshowcron ? '' : $this->i18n($this->ssh('pgrep -f cron.php', 'service') ? 'on' : 'off') . ' cron'; $f = '/docker/compose'; $c = yaml_parse_file($f)['services']; - $main[] = 'v' . getenv('VER') . ($update ? ' (have updates)' : ''); + $main[] = 'v' . getenv('VER') . " $branch" . ($update ? ' (have updates)' : ''); $main[] = ''; $main[] = $this->i18n($c['wg'] ? 'on' : 'off') . ' ' . getenv('WGPORT') . ' Wireguard'; $main[] = $this->i18n($c['wg1'] ? 'on' : 'off') . ' ' . getenv('WG1PORT') . ' Wireguard 1';