Skip to content

Commit 963e3d5

Browse files
committed
ci: Fix rollback logic for uncommitted changes in CI workflow
1 parent e1a7169 commit 963e3d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ jobs:
5454
- name: Rollback uncommitted changes for Fix Bug mocks
5555
run: |
5656
git status --porcelain
57-
if [ -n "$(git status --porcelain)" ]; then
57+
if ($?) {
5858
echo "There are uncommitted changes. Rolling back the following files:"
5959
git checkout -- test/src/network/parse_query_test.mocks.dart test/src/objects/parse_object/parse_object_test.mocks.dart
60-
else
60+
} else {
6161
echo "No uncommitted changes found."
62-
fi
62+
}
6363
- name: Publish dry run
6464
run: cd packages/dart && dart pub publish --dry-run
6565
- name: Run tests

0 commit comments

Comments
 (0)