The publish_qc command will remove all content in the target directory but this could have unintended consequences in certain situations (e.g. if the target directory is not a QC publication directory).
To prevent this a couple of options are suggested:
If target directory is not empty then check if it looks like a QC publication directory (for example, must contain index.html and processing) - conversely also check that it doesn't look like something else (e.g. analysis directory)
Alternatively (or as well) add a hidden file (e.g. .publish_qc) to indicate that a directory is a QC publication directory. If the target is not empty and doesn't contain one of these files then the publication will stop.
The
publish_qc
command will remove all content in the target directory but this could have unintended consequences in certain situations (e.g. if the target directory is not a QC publication directory).To prevent this a couple of options are suggested:
If target directory is not empty then check if it looks like a QC publication directory (for example, must contain
index.html
andprocessing
) - conversely also check that it doesn't look like something else (e.g. analysis directory)Alternatively (or as well) add a hidden file (e.g.
.publish_qc
) to indicate that a directory is a QC publication directory. If the target is not empty and doesn't contain one of these files then the publication will stop.