copperi / fedora-docs / docs-fp-o

Forked from fedora-docs/docs-fp-o 3 years ago
Clone

d19fd18 prevent deleting old content if new hasn't build

Authored and Committed by asamalik 5 years ago
    prevent deleting old content if new hasn't build
    
    I saw the following error:
    
    cp: cannot stat '/tmp/tmp.qxIAemaSWW/source/public/en-US': No such file or directory
    
    ... which looks like the Antora build failed, but exited with 0. This caused
    the docs site to give 404 because there was no content after the build.
    
    The script itself correctly failed with exit code 1 causing OpenShift
    to resubmit the build.
    
    This change makes sure that the new output actually exists before deleting
    the previous version which should prevent this in the future.