<s> from fabric . api import local , task , abort , settings <EOL> from clom import clom <EOL> from fabric . colors import green <EOL> @ task <EOL> def release ( ) : <EOL> """<STR_LIT>""" <EOL> with settings ( warn_only = True ) : <EOL> r = local ( clom . git [ '<STR_LIT>' ] ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> branch = str ( local ( "<STR_LIT>" , capture = True ) ) . strip ( ) <EOL> if branch != '<STR_LIT>' : <EOL> abort ( '<STR_LIT>' ) <EOL> elif r . return_code != <NUM_LIT:0> : <EOL> abort ( '<STR_LIT>' ) <EOL> version = open ( '<STR_LIT>' ) . read ( ) . strip ( ) <EOL> print ( green ( '<STR_LIT>' % version ) ) <EOL> local ( clom . git . flow . release . start ( version ) ) <EOL> local ( clom . git . flow . release . finish ( version , m = '<STR_LIT>' % version ) ) <EOL> local ( clom . git . push ( '<STR_LIT>' , '<STR_LIT>' , tags = True ) ) <EOL> local ( clom . python ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) </s>
