Commit 3fef028f authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

PV,PR

parent 7e1bb078
# Well
# returns string - based on file
def version_update(path,file):
with open(path+'/'+file, 'r') as content_file:
content = content_file.read()
content = content.strip(' \t\n\r')
return content
def revision_update(path,file):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
try:
res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError as e:
res = "error_"+e.returncode
res = res.strip(' \t\n\r')
return res
......@@ -13,8 +13,15 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293
SRCDATE = "20131202"
PV = "${SRCDATE}"
PR = "r0"
#PV = "${SRCDATE}"
#PR = "r0"
# PV,PR update
inherit elphel-misc
VPATH = "${TOPDIR}/../../fpga-elphel/x393"
VFILE = "VERSION"
PV = "${@version_update ('${VPATH}','${VFILE}')}"
PR = "${@revision_update('${VPATH}','${VFILE}')}"
RDEPENDS_${PN} += "\
python-core \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment