From aa9900b473c9f54c45997dee265411100b180c40 Mon Sep 17 00:00:00 2001 From: creme Date: Tue, 12 Nov 2024 00:14:24 +0100 Subject: [PATCH] show also current 'commit' with the freifunk version --- salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version | 3 ++- salt/freifunk/base/ssh/init.sls | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version b/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version index d0dc0916..29c2c219 100755 --- a/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version +++ b/salt/freifunk/base/ddmesh/usr/local/bin/freifunk-version @@ -2,7 +2,8 @@ version="$(head -n3 /srv/ffdd-server/init_server.sh | grep -oP '(?<=^#version=).+' | tr -d '"')" rev="$(cd /srv/ffdd-server && git describe --all --abbrev=0 | cut -f2 -d"/")" +commit="$(cd /srv/ffdd-server && git show --oneline -s | awk '{print $1}')" -printf '%s - %s\n' "$version" "$rev" +printf '%s - %s (%s)\n' "$version" "$rev" "$commit" exit 0 diff --git a/salt/freifunk/base/ssh/init.sls b/salt/freifunk/base/ssh/init.sls index f0247951..8351e3ab 100644 --- a/salt/freifunk/base/ssh/init.sls +++ b/salt/freifunk/base/ssh/init.sls @@ -38,7 +38,7 @@ ssh_check: ----------------------------------------------------------------- Freifunk {{ servername }} - ( Version: {{ freifunk_version }} ) + Version: {{ freifunk_version }} ----------------------------------------------------------------- - user: root - group: root