|
55 | 55 | # Remove any + suffix first (for pubspec.yaml versions like 1.2.3+4) |
56 | 56 | version=${version_line%%+*} |
57 | 57 |
|
58 | | - # Parse version: x.y.z-suffix.n → build_name=x.y.z-suffix, build_number=n |
| 58 | + # Parse version: x.y.z-suffix.n → build_name=x.y.z, build_number=n |
59 | 59 | # Supports: x.y.z, x.y.z-alpha.n, x.y.z-beta.n, x.y.z-rc.n, etc. |
60 | | - if [[ $version =~ ^([0-9]+\.[0-9]+\.[0-9]+-[a-zA-Z]+)\.([0-9]+)$ ]]; then |
| 60 | + # Note: build_name is x.y.z only (plist/Android compatibility) |
| 61 | + if [[ $version =~ ^([0-9]+\.[0-9]+\.[0-9]+)-[a-zA-Z]+\.([0-9]+)$ ]]; then |
61 | 62 | build_name="${BASH_REMATCH[1]}" |
62 | 63 | build_number="${BASH_REMATCH[2]}" |
63 | 64 | elif [[ $version =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then |
@@ -147,9 +148,10 @@ jobs: |
147 | 148 | # Remove any + suffix first (for pubspec.yaml versions like 1.2.3+4) |
148 | 149 | version=${version_line%%+*} |
149 | 150 |
|
150 | | - # Parse version: x.y.z-suffix.n → build_name=x.y.z-suffix, build_number=n |
| 151 | + # Parse version: x.y.z-suffix.n → build_name=x.y.z, build_number=n |
151 | 152 | # Supports: x.y.z, x.y.z-alpha.n, x.y.z-beta.n, x.y.z-rc.n, etc. |
152 | | - if [[ $version =~ ^([0-9]+\.[0-9]+\.[0-9]+-[a-zA-Z]+)\.([0-9]+)$ ]]; then |
| 153 | + # Note: build_name is x.y.z only (plist/Android compatibility) |
| 154 | + if [[ $version =~ ^([0-9]+\.[0-9]+\.[0-9]+)-[a-zA-Z]+\.([0-9]+)$ ]]; then |
153 | 155 | build_name="${BASH_REMATCH[1]}" |
154 | 156 | build_number="${BASH_REMATCH[2]}" |
155 | 157 | elif [[ $version =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then |
|
0 commit comments