I want to delete existing content when using Google Cloud Storage Deploy
In other words I would like to have an option that removes everything in $BUCKET before uploading then new content.
Something like this (that is not tested!!)
if [ "$DELETE_BEFORE_COPY" = "true" ]; then
run gsutil rm -f gs://${BUCKET}/ || true # Allow fail if path does not exist yet
fi
run gsutil ${METADATA_STRING} cp ${ARGS_STRING} ${SOURCE} gs://${BUCKET}/