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

PV,PR

parent 7e1bb078
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
# 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
+9 −2
Original line number Original line Diff line number Diff line
@@ -13,8 +13,15 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293


SRCDATE = "20131202"
SRCDATE = "20131202"


PV = "${SRCDATE}"
#PV = "${SRCDATE}"
PR = "r0"
#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} += "\ 
RDEPENDS_${PN} += "\ 
             python-core \
             python-core \