fix: parse pubspec version without grep -P
All checks were successful
Release APK / build (push) Successful in 57s
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:
parent
ee0c57e489
commit
a5ae854e97
1 changed files with 4 additions and 2 deletions
|
|
@ -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: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue