fix(build): skip memory mapping on doc builds

There are no binaries to analyse in documentation builds. Skip this step
so we don't pollute the logs with obvious errors e.g. `FileNotFoundError`.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: Ib0eaf6bb2f4ebab89a2c4a7fa7242fa00be5e0cc
diff --git a/script/build_package.sh b/script/build_package.sh
index 307d793..05d3dfd 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -551,7 +551,9 @@
 		DEBUG="$DEBUG" V=1 SPIN_ON_BL1_EXIT="$connect_debugger" \
 		$build_targets 3>&1 &>>"$build_log" || fail_build
 
-        poetry run memory -sr "$tf_build_path" 2>&1 | tee -a "$build_log"
+        if [ "$build_targets" != "doc" ]; then
+                poetry run memory -sr "$tf_build_path" 2>&1 | tee -a "$build_log"
+        fi
 	)
 }