diff --git a/.gitlab/gen-badge.sh b/.gitlab/gen-badge.sh
index cff4814af18d72853f6b7254c862d50f7c8f5ae7..154b22d62d36406440bea8196cdcd6a8dfcfd615 100644
--- a/.gitlab/gen-badge.sh
+++ b/.gitlab/gen-badge.sh
@@ -1,14 +1,14 @@
 #!/bin/bash
 GITLAB_URL="https://gitlab.phaidra.org"
 # if we reached this script, all the tests have passed
-anybadge --label pipeline --value "passed" failed=red passed=green canceled=darkgray > "./final/${APP_VERSION}/images/pipeline.svg"
+anybadge --label pipeline --value "passed" failed=red passed=green canceled=darkgray > "./final/${DOC_VERSION}/images/pipeline.svg"
 PIPELINE_COVERAGE=$(curl -fsSL -H "PRIVATE-TOKEN: ${CI_TOKEN}" "${GITLAB_URL}/api/v4/projects/450/pipelines/latest?ref=${CI_COMMIT_BRANCH}" | jq --raw-output .coverage)
 echo "[INFO] pipeline coverage: ${PIPELINE_COVERAGE}"
 if [ "${PIPELINE_COVERAGE}" != "null" ]; then
-  anybadge --label coverage --value "${PIPELINE_COVERAGE}" coverage > "./final/${APP_VERSION}/images/coverage.svg"
+  anybadge --label coverage --value "${PIPELINE_COVERAGE}" coverage > "./final/${DOC_VERSION}/images/coverage.svg"
 else
   echo "[WARNING] Skipping badge generation, displaying default badge text: unknown"
 fi
-curl "${SONARQUBE_URL}/api/project_badges/measure?project=fair-data-austria-db-repository_fda-services_a57fa043-ab99-4cdd-a721-162d9a916d77&metric=sqale_rating&token=${CI_SONAR_TOKEN}" > "./final/${APP_VERSION}/images/maintainability.svg"
-curl "${SONARQUBE_URL}/api/project_badges/measure?project=fair-data-austria-db-repository_fda-services_a57fa043-ab99-4cdd-a721-162d9a916d77&metric=security_rating&token=${CI_SONAR_TOKEN}" > "./final/${APP_VERSION}/images/security.svg"
+curl "${SONARQUBE_URL}/api/project_badges/measure?project=fair-data-austria-db-repository_fda-services_a57fa043-ab99-4cdd-a721-162d9a916d77&metric=sqale_rating&token=${CI_SONAR_TOKEN}" > "./final/${DOC_VERSION}/images/maintainability.svg"
+curl "${SONARQUBE_URL}/api/project_badges/measure?project=fair-data-austria-db-repository_fda-services_a57fa043-ab99-4cdd-a721-162d9a916d77&metric=security_rating&token=${CI_SONAR_TOKEN}" > "./final/${DOC_VERSION}/images/security.svg"
 echo "[INFO] retrieved SonarQube badges"
\ No newline at end of file