Skip to content
Snippets Groups Projects
Select Git revision
  • 6580591090395ce69e55771a2e5d578afcf3a9ac
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
41 results

t_resourceassigner.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    tag_software_version.py 805 B
    #! /usr/bin/python3
    
    import subprocess
    import time
    
    
    tag_str = time.strftime("%Y-%m-%dT%H.%M.%S_sdptr", time.gmtime())
    p1 = subprocess.Popen('git tag -a {} -m "production version"'.format(tag_str), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
    print(p1.communicate()[0])
    
    p2 = subprocess.Popen('git describe --tags --always', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
    
    version = p2.communicate()[0].decode('utf-8')
    print(version)
    
    
    with open('config.h', 'r') as fd:
        config_file = fd.read()
    
    ptr = config_file.find('#define VERSION')
    ptr1 = config_file.find('"', ptr) + 1
    ptr2 = config_file.find('"', ptr1)
    
    old_version = config_file[ptr1:ptr2]
    config_file = config_file.replace(old_version, version.strip())
    
    with open('config.h', 'w') as fd:
        fd.write(config_file)