From bf30f358b59572b9fa4301d514b9ad25010fe156 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Wed, 26 Aug 2026 10:54:04 +0200 Subject: [PATCH] ci: fix version extraction, grep -oP unsupported on Alpine/BusyBox The gitea-pages workflow runs in the alpine-jupyterbook container, whose grep lacks PCRE (-P) support, so the version-extraction step failed. Use a portable awk field scan instead, and fail loudly if the version can't be found. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/deploy-pages.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy-pages.yml b/.gitea/workflows/deploy-pages.yml index 2632541c..fa21611f 100644 --- a/.gitea/workflows/deploy-pages.yml +++ b/.gitea/workflows/deploy-pages.yml @@ -22,7 +22,11 @@ jobs: - name: Extract project version from CMakeLists.txt run: | - VERSION=$(grep -oP 'project\(\s*musrfit\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + VERSION=$(awk '/project\(musrfit/{for(i=1;i<=NF;i++) if($i=="VERSION"){print $(i+1); exit}}' CMakeLists.txt) + if [ -z "$VERSION" ]; then + echo "Could not extract musrfit version from CMakeLists.txt" >&2 + exit 1 + fi echo "MUSRFIT_VERSION=$VERSION" >> $GITHUB_ENV - name: Build musrfit-tech-docu