Ignore:
Timestamp:
12/04/16 15:48:15 (4 years ago)
Author:
mjuckes
Message:

updated step1 to use parse_version from pkg_resources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreq/manage/step1.py

    r519 r637  
    1010""" 
    1111 
     12from pkg_resources import parse_version 
    1213import sys, os, glob, string, time 
    1314if os.path.isfile( 'step2.sh' ): 
     
    3738  bits = string.split(vs, '.' ) 
    3839  estr = 'Version string should be "nn.nn" or "nn.[alpha|beta].nn": %s' % vs 
    39   assert len(bits) in [2,3], estr 
     40  assert len(bits) in [2,3,4], estr 
    4041  if len( bits ) == 3: 
    4142    assert bits[1] in ['alpha','beta'], estr 
     
    6869thiscomment = sys.argv[1] 
    6970thistag = version 
    70 thistn = tuple( f1( version ) ) 
     71thistn = parse_version( version ) 
    7172if len(tags) > 0: 
    72   tn = map( lambda x: tuple( f1(string.split(x,'/')[-1]) ),  tags ) 
    73   tn.sort(tcmp) 
     73  tn = map( parse_version,  tags ) 
     74  tn.sort() 
    7475  assert thistn > tn[-1], 'Requested tag not greater than last tag: %s' % str(tn[-1]) 
    7576 
     
    8788svn ci -m "Updated setup for tag %(thistag)s" 
    8889svn copy %(svnBaseUrl)s/trunk %(svnBaseUrl)s/tags/%(thistag)s -m "%(thiscomment)s" 
     90 
     91## cd %(svnBaseUrl)s/tags 
     92## svn del latest 
     93## svn ci -m "removed latest" 
     94#svn copy   %(svnBaseUrl)s/tags/%(thistag)s  %(svnBaseUrl)s/tags/latest 
    8995""" 
    9096 
Note: See TracChangeset for help on using the changeset viewer.