def set_up(): # Init repository with one file. remove_dir(_FLAGS, _TEST_DIR) mkdirs(_FLAGS, _TEST_DIR) init_repository(_FLAGS, _TEST_DIR) chdir(_TEST_DIR) create_file(_FLAGS, _TEST_FILE) commit_changes(_FLAGS, "Test file added.") # Create branches. create_branch(_FLAGS, _UPSTREAM) switch_branch(_UPSTREAM) create_branch(_FLAGS, _DEBIAN) switch_branch(_DEBIAN) mkdirs(_FLAGS, path.dirname(_TEST_DEBIAN_FILE)) create_file(_FLAGS, _TEST_DEBIAN_FILE) commit_changes(_FLAGS, "Test debian file added.") # Commit ignored file and config. switch_branch(_RELEASE) create_file(_FLAGS, _IGNORE_FILE) create_file(_FLAGS, _TEST_FILE2) execute_with(action=Action.CONFIG) commit_changes(_FLAGS, "Ignored file added.")
def setUp(self): set_up() verify_create_head_tag(_FLAGS, _RELEASE, _RELEASE_TAG_TYPE, "0.1") execute_with(action=Action.COMMIT_RELEASE, verbose=True)