Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0a0b3d8 in mainline


Ignore:
Timestamp:
2017-11-13T21:26:59Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
e8f9bf0
Parents:
0dd4779
Message:

Make tools/*.py scripts Git aware

Location:
tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tools/config.py

    r0dd4779 r0a0b3d8  
    460460       
    461461        try:
    462                 version = subprocess.Popen(['bzr', 'version-info', '--custom', '--template={clean}:{revno}:{revision_id}'], stdout = subprocess.PIPE).communicate()[0].decode().split(':')
     462                version = subprocess.Popen(['git', 'log', '-1', '--pretty=%h'], stdout = subprocess.PIPE).communicate()[0].decode().strip()
    463463                sys.stderr.write("ok\n")
    464464        except:
    465                 version = [1, "unknown", "unknown"]
     465                version = None
    466466                sys.stderr.write("failed\n")
    467467       
    468         if (not strip_rev_info) and (len(version) == 3):
    469                 revision = version[1]
    470                 if version[0] != 1:
    471                         revision += 'M'
    472                 revision += ' (%s)' % version[2]
     468        if (not strip_rev_info) and (version is not None):
     469                revision = version
    473470        else:
    474471                revision = None
  • tools/dest_build.py

    r0dd4779 r0a0b3d8  
    3838import subprocess
    3939
    40 exclude_names = set(['.svn', '.bzr'])
     40exclude_names = set(['.svn', '.bzr', '.git'])
    4141
    4242def duplicate_tree(src_path, dest_path, current):
  • tools/imgutil.py

    r0dd4779 r0a0b3d8  
    3636import stat
    3737
    38 exclude_names = set(['.svn', '.bzr'])
     38exclude_names = set(['.svn', '.bzr', '.git'])
    3939
    4040def align_up(size, alignment):
Note: See TracChangeset for help on using the changeset viewer.