vslavik / bakefile

Bakefile makefiles generator
http://bakefile.org
MIT License
142 stars 20 forks source link

Legacy version check fails #87

Closed bestlem closed 7 years ago

bestlem commented 7 years ago

The check for bakefile versions does a string comparison so version 0.2.10 is not greater that 0.2.7 so the new version appears to be older that the required one.

A fix is in utils.py Working code is

def checkBakefileVersion(version):
    """Returns true iff current bakefile version is at least 'version'.
       'version' is string with three numbers separated with dots,
       e.g. '0.1.4'."""
    vcur = mk.vars['BAKEFILE_VERSION'].split('.')
    vreq = version.split('.')
    #return vcur >= vreq
    for i in range(len(vcur)):
        if int(vreq[i]) > int(vcur[i]):
            return False
    return True
vslavik commented 7 years ago

Working code is

Please transform this into a PR, thanks!

vslavik commented 7 years ago

There almost certainly won't be a 0.2.11 release. Just use 0.2.9 in version checks, there's no possible bakefile that could require a newer version.

vslavik commented 7 years ago

Just use 0.2.9 in version checks

Ah, damn, now I understand. Sorry for the noise :(

edorax commented 7 years ago

It's better to release 0.2.11.