Changeset f7b7a35 for this_version.py


Ignore:
Timestamp:
Mar 23, 2017, 6:07:41 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
255fe0a
Parents:
bef7726
Message:

this_version.py: add +mods if git tree is not clean

File:
1 edited

Legend:

Unmodified
Added
Removed
  • this_version.py

    rbef7726 rf7b7a35  
    107107    gitcmd.append('HEAD')
    108108    try:
    109         outCmd = subprocess.check_output(gitcmd).strip().decode('utf8')
     109        gitsha = subprocess.check_output(gitcmd).strip().decode('utf8')
    110110    except Exception as e:
    111111        print('git command error :%s' % e)
    112112        return None
    113     return outCmd
     113
     114    # check if we have a clean tree
     115    gitcmd = ['git', '-C', aubio_dir, 'diff-index', '--quiet']
     116    gitcmd.append('HEAD')
     117    try:
     118        subprocess.check_output(gitcmd).strip().decode('utf8')
     119    except Exception as e:
     120        gitsha += '+mods'
     121    return gitsha
Note: See TracChangeset for help on using the changeset viewer.