|
2 | 2 |
|
3 | 3 | # Define paths |
4 | 4 | BUILD_LOG=$1 |
| 5 | +ROM_REPORT=$2 |
| 6 | +RAM_REPORT=$3 |
5 | 7 |
|
6 | 8 | FLASH_BADGE_FILE_DEST=docs/flash_badge.json |
7 | 9 | RAM_BADGE_FILE_DEST=docs/ram_badge.json |
8 | 10 | FLASH_HISTORY_CSV_DEST=docs/flash_history.csv |
9 | 11 | RAM_HISTORY_CSV_DEST=docs/ram_history.csv |
10 | 12 | FLASH_PLOT_HTML_DEST=docs/flash_history_plot.html |
11 | 13 | RAM_PLOT_HTML_DEST=docs/ram_history_plot.html |
| 14 | +ROM_REPORT_DEST=docs/rom_report_thingy91x.html |
| 15 | +RAM_REPORT_DEST=docs/ram_report_thingy91x.html |
12 | 16 |
|
13 | | -if [ -z "$BUILD_LOG" ]; then |
14 | | - echo "Error: Build log file path not provided" |
| 17 | +if [ -z "$BUILD_LOG" ] || [ -z "$ROM_REPORT" ] || [ -z "$RAM_REPORT" ]; then |
| 18 | + echo "Error: Missing required arguments" |
| 19 | + echo "Usage: $0 <build_log> <rom_report> <ram_report>" |
15 | 20 | exit 0 |
16 | 21 | fi |
17 | 22 |
|
@@ -62,10 +67,13 @@ mkdir -p docs |
62 | 67 | cp "$TEMP_DIR"/*.json docs/ |
63 | 68 | cp "$TEMP_DIR"/*.csv docs/ |
64 | 69 | cp "$TEMP_DIR"/*.html docs/ |
| 70 | +cp "$ROM_REPORT" "$ROM_REPORT_DEST" |
| 71 | +cp "$RAM_REPORT" "$RAM_REPORT_DEST" |
65 | 72 |
|
66 | 73 | git add $FLASH_BADGE_FILE_DEST $RAM_BADGE_FILE_DEST \ |
67 | 74 | $FLASH_HISTORY_CSV_DEST $RAM_HISTORY_CSV_DEST \ |
68 | | - $FLASH_PLOT_HTML_DEST $RAM_PLOT_HTML_DEST |
| 75 | + $FLASH_PLOT_HTML_DEST $RAM_PLOT_HTML_DEST \ |
| 76 | + $ROM_REPORT_DEST $RAM_REPORT_DEST |
69 | 77 | git commit -m "Update memory usage badges" |
70 | 78 | git push origin gh-pages |
71 | 79 |
|
|
0 commit comments