@task
def get_previous_version_tag():
 shortversion = get_sympy_short_version()
 curcommit = 'HEAD'
 with cd('/home/vagrant/repos/sympy'):
  while True:
   curtag = run(('git describe --abbrev=0 --tags ' + curcommit)).strip()
   if (shortversion in curtag):
    parents = local(('git rev-list --parents -n 1 ' + curtag), capture=True).strip().split()
    assert (len(parents) == 2), curtag
    curcommit = (curtag + '^')
   else:
    print(blue('Using {tag} as the tag for the previous release.'.format(tag=curtag), bold=True))
    return curtag
  error('Could not find the tag for the previous release.')

@ task def get_previous_version_tag ( ) : shortversion = get_sympy_short_version ( ) curcommit = 'HEAD' with cd ( '/home/vagrant/repos/sympy' ) : while True : curtag = run ( ( 'git describe --abbrev=0 --tags ' + curcommit ) ) . strip ( ) if ( shortversion in curtag ) : parents = local ( ( 'git rev-list --parents -n 1 ' + curtag ) , capture = True ) . strip ( ) . split ( ) assert ( len ( parents ) == 2 ) , curtag curcommit = ( curtag + '^' ) else : print ( blue ( 'Using {tag} as the tag for the previous release.' . format ( tag = curtag ) , bold = True ) ) return curtag error ( 'Could not find the tag for the previous release.' )
get the version of the previous release .