Skip to content
Snippets Groups Projects
Select Git revision
  • a8bba72aeeab3ced5762364386455f95e6a30744
  • master default protected
  • develop protected
  • conda
  • 3.6.0
  • 3.5.0
  • 3.4.2
  • 3.4.1
  • 3.4.0
  • 3.4.0-rc2
  • 3.4.0-rc
  • 3.3.1
  • 3.3.1-rc
  • 3.3.0
  • 3.3.0-rc2
  • 3.3.0-rc
  • 3.2.1
  • 3.2.1-rc
  • 3.2.0
  • 3.2.0-rc
  • 3.1.1
  • 3.1.1-rc2
  • 3.1.1-rc
  • 3.1.0
24 results

_ring_punches.py

Blame
  • bump-version.py 828 B
    #!/usr/bin/env python
    import sys
    out=[]
    version=sys.argv[1].split('.')
    if len(version)==2:
      major, minor, patch=(int(version[0]), int(version[1]), 0)
    else:
      major, minor, patch=(int(version[0]), int(version[1]), int(version[2]))
    for line in open('modules/config/version.hh'):
      if line.startswith('#define OST_VERSION_MAJOR'):
        out.append('#define OST_VERSION_MAJOR %d\n' % major)
      elif line.startswith('#define OST_VERSION_MINOR'):
        out.append('#define OST_VERSION_MINOR %d\n' % minor)
      elif line.startswith('#define OST_VERSION_PATCH'):
        out.append('#define OST_VERSION_PATCH %d\n' % patch)
      elif line.startswith("#define OST_VERSION_STRING"):
        out.append('#define OST_VERSION_STRING "%d.%d.%d"\n' % (major,minor,patch))
      else:
        out.append(line)
    
    open('modules/config/version.hh', 'w').write(''.join(out))