tf-a-lts-docs-watcher.sh: correct conditional check

RTD changed the API error message. [1]
So, check the confirmed field instead of the error message.

[1]: https://ci.trustedfirmware.org/job/tf-a-lts-release-docs/19/console#:~:text=%27%5B%27%20%27No%20Version%20matches%20the%20given%20query.%27%20%3D%3D%20%27Not%20found.%27%20%27%5D%27

Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I6202d8d241269428e7eb41ad79d65296eaa50386
diff --git a/scripts/tf-a-lts-docs-watcher.sh b/scripts/tf-a-lts-docs-watcher.sh
index 7e71029..f2f97fe 100755
--- a/scripts/tf-a-lts-docs-watcher.sh
+++ b/scripts/tf-a-lts-docs-watcher.sh
@@ -50,16 +50,16 @@
     max_retry_time=20
     retry=0
 
-    ver_status=$(curl -s -H "Authorization: Token ${RTD_API_TOKEN}" ${RTD_VER_API}/${version}/ | \
-                 jq -r '.detail')
+    ver_slug=$(curl -s -H "Authorization: Token ${RTD_API_TOKEN}" ${RTD_VER_API}/${version}/ | \
+                 jq -r '.slug')
 
-    while [ "${ver_status}" == "Not found." ];
+    while [ "${ver_slug}" != "${version}" ];
     do
         [ ${retry} -gt ${max_retry_time} ] && break 
         sleep 30
         retry=$((retry+1))
-        ver_status=$(curl -s -H "Authorization: Token ${RTD_API_TOKEN}" ${RTD_VER_API}/${version}/ | \
-                     jq -r '.detail')
+        ver_slug=$(curl -s -H "Authorization: Token ${RTD_API_TOKEN}" ${RTD_VER_API}/${version}/ | \
+                     jq -r '.slug')
     done
 
     if [ ${retry} -le ${max_retry_time} ]; then