Skip to content

Commit 08a7afb

Browse files
committed
Fixed CI Flutter detection
1 parent badee96 commit 08a7afb

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

.github/workflows/_base-has_flutter.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ jobs:
3030
exit 0
3131
fi
3232
33-
if awk '
34-
$1 == "environment:" { in_env=1 }
35-
in_env && $1 == "sdk:" { in_env=0 }
36-
in_env && $1 == "flutter:" { found=1 }
37-
END { exit(found?0:1) }
38-
' "$PUBSPEC"; then
33+
# if has a "flutter:" anywhere in the file
34+
if grep -q "flutter:" "$PUBSPEC"; then
3935
echo "Flutter SDK detected."
4036
echo "is_flutter=1" >> "$GITHUB_OUTPUT"
4137
else

.github/workflows/example.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ on:
1010
paths:
1111
- 'example/**/*.dart'
1212
- 'example/**/*.yaml'
13-
- .github/workflows/_base-dart.yaml
14-
- .github/workflows/_base-flutter.yaml
13+
- .github/workflows/_base*.yaml
1514
- .github/workflows/example.yaml
1615
release:
1716
types: [published]

.github/workflows/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
paths:
1313
- '**.dart'
1414
- './*.yaml'
15-
- .github/workflows/_base-dart.yaml
15+
- .github/workflows/_base*.yaml
1616
- .github/workflows/package.yaml
1717
release:
1818
types: [published]

0 commit comments

Comments
 (0)