[bitbake-devel] [PATCH 05/10] toaster: get proper version string
Alex DAMIAN
alexandru.damian at intel.com
Wed Feb 18 19:10:59 UTC 2015
From: Alexandru DAMIAN <alexandru.damian at intel.com>
This patch brings in the toaster tree commit ID in
the version string to allow users properly report their
toaster version when submitting issues.
Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
lib/toaster/toastermain/settings.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/toastermain/settings.py b/lib/toaster/toastermain/settings.py
index b6a42c0..a7304fa 100644
--- a/lib/toaster/toastermain/settings.py
+++ b/lib/toaster/toastermain/settings.py
@@ -232,7 +232,8 @@ from os.path import dirname as DN
SITE_ROOT=DN(DN(os.path.abspath(__file__)))
import subprocess
-TOASTER_VERSION = subprocess.Popen('cd %s; git branch | grep "^* " | tr -d "* "' % SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
+TOASTER_VERSION = subprocess.Popen('git branch | grep "^* " | tr -d "* "', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
+TOASTER_VERSION += " " + subprocess.Popen('git rev-parse HEAD ', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
ROOT_URLCONF = 'toastermain.urls'
--
1.9.1
More information about the bitbake-devel
mailing list