fix: parse pubspec version without grep -P
All checks were successful
Release APK / build (push) Successful in 57s

The CI runner's grep has no PCRE support, so grep -P silently matched
nothing and produced an empty VERSION_CODE/VERSION_NAME.
This commit is contained in:
randogoth 2026-10-14 11:03:59 +03:00
parent ee0c57e489
commit a5ae854e97

View file

@ -13,9 +13,11 @@ jobs:
- name: Extract version - name: Extract version
run: | run: |
# Plain parameter expansion, not `grep -P` — the runner's grep
# build has no PCRE support, so -P silently matches nothing.
VERSION=$(grep '^version:' app/pubspec.yaml | sed 's/version: //') VERSION=$(grep '^version:' app/pubspec.yaml | sed 's/version: //')
echo "VERSION_CODE=$(echo "$VERSION" | grep -oP '(?<=\+)\d+')" >> $GITHUB_ENV echo "VERSION_CODE=${VERSION##*+}" >> $GITHUB_ENV
echo "VERSION_NAME=$(echo "$VERSION" | grep -oP '^[^+]+')" >> $GITHUB_ENV echo "VERSION_NAME=${VERSION%%+*}" >> $GITHUB_ENV
- name: Decode keystore - name: Decode keystore
run: | run: |