From bcfabeef6ab914e5fcf14e2778e75b62bf65eced Mon Sep 17 00:00:00 2001
From: Felix Gerking <felix.gerking@garz-fricke.com>
Date: Wed, 30 Mar 2022 14:49:10 +0200
Subject: [PATCH] manifest-CI: Fix conditions for  alphaplan_fwr script call

---
 manifest-build.yml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/manifest-build.yml b/manifest-build.yml
index 29530c2..b0987e7 100644
--- a/manifest-build.yml
+++ b/manifest-build.yml
@@ -152,13 +152,17 @@ variables:
 
       # Generate AlphaPlan FWR articles if release tag is set
       apscript=".gitlab-ci/alphaplan_fwr.py"
-      [ ! -x "${apscript}" ] && script=".repo/manifests/${apscript}"
-      [ ! -x "${apscript}" ] && echo "Failed to find alphaplan_fwr script"
 
       #if [ -n "$CI_COMMIT_TAG" ] && \
       echo "CI AP debug mode"
       if true && \
+        [ -d "${ARTIFACTS_IMAGE_PATH}" ] && \
         [[ "${CI_PARAM_PACKAGE_FTP}" == "false" ]];then
+        # Check if alphaplan fwr script is available
+        [ ! -x "${apscript}" ] && \
+          echo "Failed to find alphaplan_fwr script" && \
+          exit 1
+        # Call script
         ${apscript} \
               --images-dir="${ARTIFACTS_IMAGE_PATH}" \
               --outputdir-local=${outdir} \
-- 
GitLab