We need to determine sizes of large files going into Nexus since there
is a 500 MB limit. Let's log all files larger than 200 MB into a file so
we can track them.
Change-Id: Ia38e81544f857785364b3c19a575dbd0aaa1735e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
-DserverId="$NEXUS_STAGING_SERVER_ID" \
-s "$SETTINGS_FILE" \
-gs "$GLOBAL_SETTINGS_FILE" | tee "$WORKSPACE/deploy-staged-repository.log"
+
+# Log all files larger than 200 MB into large-files.log
+while IFS= read -r -d '' file
+do
+ FILE_SIZE=$(du --summarize --block-size 1 "$file" | awk '{print $1}')
+ # Check if file size is larger than 200 MB
+ if [[ $FILE_SIZE -gt 209715200 ]]; then
+ echo "$FILE_SIZE $file" >> "$WORKSPACE/large-files.log"
+ fi
+done < <(find "$(pwd)/m2repo" -type f -print0)