pandora-version: update version
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 9 Jul 2015 20:51:33 +0000 (23:51 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 9 Jul 2015 21:21:36 +0000 (00:21 +0300)
recipes/pandora-system/pandora-version.bb

index c90df6d..07e4b6e 100644 (file)
@@ -1,16 +1,21 @@
 DESCRIPTION = "Installs /etc/op-version file."
 LICENSE = "Public Domain"
-PR = "r6"
+PR = "r7"
 
 do_install() {
   OLD_PWD=$PWD
-  opvf=${D}/${sysconfdir}/op-version
   cd `dirname "${FILE_DIRNAME}"`
+  tag=`git describe --abbrev=0`
+  commits=`git log --oneline ${tag}..HEAD | wc -l`
+  updv=""
+  test "$commits" = "0" || updv=" update $commits"
   install -d ${D}${sysconfdir}/
+  opvf=${D}/${sysconfdir}/op-version
   echo "Tag Name: `git describe`" > ${opvf}
   echo "GIT-VERSION: `git log -n1 --pretty=oneline|awk '{print $1}'`" >> ${opvf}
   echo "Branch: `git branch | awk '/*/{print $2}'`" >> ${opvf}
-  echo "Version: 1.9.2.3 - R1.71 Codename Super Zaxxon" >> ${opvf}
+  echo "Version: 1.9.2.4 - R1.72 RC Codename Super Zaxxon" >> ${opvf}
+  echo "Display Ver: SuperZaxxon 1.72 RC${updv}" >> ${opvf}
   echo "Image Builder: ${LOGNAME}@`cat /etc/hostname`" >> ${opvf}
   echo "Time Stamp: `date -R`" >> ${opvf}
 }