<s> """<STR_LIT>""" <EOL> import argparse <EOL> import re <EOL> import subprocess <EOL> VERSION_REGEX = r'<STR_LIT>' <EOL> INIT_FILE = '<STR_LIT>' <EOL> def deploy ( ) : <EOL> parser = argparse . ArgumentParser ( ) <EOL> parser . add_argument ( <EOL> '<STR_LIT:version>' , <EOL> help = '<STR_LIT>' ) <EOL> args = parser . parse_args ( ) <EOL> if not re . match ( '<STR_LIT>' , args . version ) : <EOL> argparse . error ( '<STR_LIT>' . format ( args . version ) ) <EOL> with open ( INIT_FILE ) as init_file : <EOL> init_file_contents = init_file . read ( ) <EOL> repl = r'<STR_LIT>' . format ( args . version ) <EOL> new_file_contents = re . sub ( <EOL> VERSION_REGEX , repl , init_file_contents , flags = re . MULTILINE ) <EOL> with open ( INIT_FILE , '<STR_LIT:w>' ) as init_file : <EOL> init_file . write ( new_file_contents ) <EOL> subprocess . call ( <EOL> '<STR_LIT>' % args . version , <EOL> shell = True ) <EOL> subprocess . call ( <EOL> '<STR_LIT>' % args . version , shell = True ) <EOL> subprocess . call ( <EOL> '<STR_LIT>' , shell = True ) <EOL> print '<STR_LIT>' % args . version <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> deploy ( ) </s>
