replace_with_file (filename, ensure_dir=None, copy=False)

This method will replace the artifact with another file on the file system on commit. This is useful when you are dealing with external applications that create temporaries. By default the file is moved as this is what's common with temporaries but this can be changed into a copy with copy=True.


ctx = get_ctx()
def build_stylesheet(artifact):
    temporary_file = invoke_external_program()