diff --git a/infra/nightly.sh b/infra/nightly.sh index 5240c2175..e5546ea70 100755 --- a/infra/nightly.sh +++ b/infra/nightly.sh @@ -97,12 +97,19 @@ popd # Update HTML index page. cp "$RESOURCE_DIR"/* "$OUTPUT_DIR" -# copy data over to output -cp -r "$DATA_DIR" "$OUTPUT_DATA_DIR" +# copy data over to output in local mode, enabling regeneration of reports with --update flag +if [ "$LOCAL" != "" ]; then + cp -r "$DATA_DIR" "$OUTPUT_DATA_DIR" +fi + +# move data over to output in non-local mode +if [ "$LOCAL" == "" ]; then + mv "$DATA_DIR" "$OUTPUT_DATA_DIR" +fi # gzip all JSON and svgs in the nightly dir if [ "$LOCAL" == "" ]; then - gzip "$PROFILE_JSON" + gzip "$OUTPUT_DATA_DIR/profile.json" find "$OUTPUT_DIR" -name '*.svg' -exec gzip {} + find "$OUTPUT_DIR" -name '*.ll' -exec gzip {} + fi