diff --git a/build-docs.sh b/build-docs.sh
index ffc17120b0e452732d8dde9688b75a07a23ad24d..67875c2d84075bdbd851c8064414f4ba8602f816 100644
--- a/build-docs.sh
+++ b/build-docs.sh
@@ -17,7 +17,7 @@ function generate_sphinx {
   pip install -r ./requirements.txt > /dev/null
   mkdir -p ./final
   if [ "$1" = "latest" ]; then
-    sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" ./lib/python/setup.py ./lib/python/pyproject.toml ./lib/python/docs/conf.py ./lib/python/docs/index.rst ./lib/python/docs/index.rst
+    sed -i -e "s/__APPVERSION__/$1/g" ./lib/python/setup.py ./lib/python/pyproject.toml ./lib/python/docs/conf.py ./lib/python/docs/index.rst ./lib/python/docs/index.rst
   fi
   sphinx-apidoc -o ./lib/python/docs/source ./lib/python/dbrepo
   sphinx-build -M html ./lib/python/docs/ ./lib/python/docs/build/