Skip to content

Commit 3879234

Browse files
authored
Merge pull request #1 from landamessenger/develop
Bump dependencies
2 parents 4fcf6e0 + 81a2e4c commit 3879234

9 files changed

Lines changed: 354 additions & 10 deletions
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Push Analyze Check
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
- '!master'
8+
9+
jobs:
10+
push_check_analyze:
11+
12+
runs-on: self-hosted
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Node.js 18
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18.x'
21+
22+
- name: Install Landa Messenger CLI
23+
run: npm install @landamessenger/landa-messenger-api -g
24+
25+
- uses: subosito/flutter-action@v1
26+
with:
27+
channel: 'stable'
28+
flutter-version: '3.24.3'
29+
30+
- run: flutter pub get
31+
32+
- run: flutter analyze
33+
34+
- name: Handle job completion
35+
if: always()
36+
run: |
37+
if [ "${{ job.status }}" == "failure" ]; then
38+
landa-messenger-api chat-send \
39+
--id "${{ secrets.CHAT_ID }}" \
40+
--api_key "${{ secrets.CHAT_KEY }}" \
41+
--title "🔴 Analysis Failed" \
42+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
43+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_analyze.yml" \
44+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
45+
--background_color "#55000000" \
46+
--text_color "#FFFFFFFF"
47+
elif [ "${{ job.status }}" == "cancelled" ]; then
48+
landa-messenger-api chat-send \
49+
--id "${{ secrets.CHAT_ID }}" \
50+
--api_key "${{ secrets.CHAT_KEY }}" \
51+
--title "🟠 Analysis Canceled" \
52+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
53+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_analyze.yml" \
54+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
55+
--background_color "#55000000" \
56+
--text_color "#FFFFFFFF"
57+
else
58+
landa-messenger-api chat-send \
59+
--id "${{ secrets.CHAT_ID }}" \
60+
--api_key "${{ secrets.CHAT_KEY }}" \
61+
--title "🟢 Analysis Passed" \
62+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
63+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_analyze.yml" \
64+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
65+
--background_color "#55000000" \
66+
--text_color "#FFFFFFFF"
67+
fi
68+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Push Publish Dry Run Check
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
- '!master'
8+
9+
jobs:
10+
push_check_publish_dry_run:
11+
12+
runs-on: self-hosted
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Node.js 18
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18.x'
21+
22+
- name: Install Landa Messenger CLI
23+
run: npm install @landamessenger/landa-messenger-api -g
24+
25+
- uses: subosito/flutter-action@v1
26+
with:
27+
channel: 'stable'
28+
flutter-version: '3.24.3'
29+
30+
- run: flutter pub get
31+
32+
- run: dart pub publish --dry-run
33+
34+
- name: Handle job completion
35+
if: always()
36+
run: |
37+
if [ "${{ job.status }}" == "failure" ]; then
38+
landa-messenger-api chat-send \
39+
--id "${{ secrets.CHAT_ID }}" \
40+
--api_key "${{ secrets.CHAT_KEY }}" \
41+
--title "🔴 Dry Publish Failed" \
42+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
43+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_publish_dry_run.yml" \
44+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
45+
--background_color "#55000000" \
46+
--text_color "#FFFFFFFF"
47+
elif [ "${{ job.status }}" == "cancelled" ]; then
48+
landa-messenger-api chat-send \
49+
--id "${{ secrets.CHAT_ID }}" \
50+
--api_key "${{ secrets.CHAT_KEY }}" \
51+
--title "🟠 Dry Publish Canceled" \
52+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
53+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_publish_dry_run.yml" \
54+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
55+
--background_color "#55000000" \
56+
--text_color "#FFFFFFFF"
57+
else
58+
landa-messenger-api chat-send \
59+
--id "${{ secrets.CHAT_ID }}" \
60+
--api_key "${{ secrets.CHAT_KEY }}" \
61+
--title "🟢 Dry Publish Passed" \
62+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
63+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_publish_dry_run.yml" \
64+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
65+
--background_color "#55000000" \
66+
--text_color "#FFFFFFFF"
67+
fi
68+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Push Test Check
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
- '!master'
8+
9+
jobs:
10+
push_check_test:
11+
12+
runs-on: self-hosted
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Node.js 18
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18.x'
21+
22+
- name: Install Landa Messenger CLI
23+
run: npm install @landamessenger/landa-messenger-api -g
24+
25+
- uses: subosito/flutter-action@v1
26+
with:
27+
channel: 'stable'
28+
flutter-version: '3.24.3'
29+
30+
- run: flutter pub get
31+
32+
- run: flutter test --coverage
33+
34+
- name: Upload coverage to Codecov
35+
uses: codecov/codecov-action@v4
36+
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}
38+
file: coverage/lcov.info
39+
40+
- name: Handle job completion
41+
if: always()
42+
run: |
43+
if [ "${{ job.status }}" == "failure" ]; then
44+
landa-messenger-api chat-send \
45+
--id "${{ secrets.CHAT_ID }}" \
46+
--api_key "${{ secrets.CHAT_KEY }}" \
47+
--title "🔴 Test Failed" \
48+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
49+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_test.yml" \
50+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
51+
--background_color "#55000000" \
52+
--text_color "#FFFFFFFF"
53+
elif [ "${{ job.status }}" == "cancelled" ]; then
54+
landa-messenger-api chat-send \
55+
--id "${{ secrets.CHAT_ID }}" \
56+
--api_key "${{ secrets.CHAT_KEY }}" \
57+
--title "🟠 Test Canceled" \
58+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
59+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check.yml" \
60+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
61+
--background_color "#55000000" \
62+
--text_color "#FFFFFFFF"
63+
else
64+
landa-messenger-api chat-send \
65+
--id "${{ secrets.CHAT_ID }}" \
66+
--api_key "${{ secrets.CHAT_KEY }}" \
67+
--title "🟢 Test Passed" \
68+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
69+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check.yml" \
70+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
71+
--background_color "#55000000" \
72+
--text_color "#FFFFFFFF"
73+
fi
74+
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Tag Version and Publish on Push to Master
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- master
9+
10+
jobs:
11+
tag_version_and_publish:
12+
if: github.event.pull_request.merged == true
13+
14+
runs-on: self-hosted
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Read version from pubspec.yml
20+
id: read_version
21+
run: |
22+
VERSION=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2)
23+
echo "VERSION=$VERSION" >> $GITHUB_ENV
24+
25+
- name: Create tag
26+
id: create_tag
27+
run: |
28+
# Check if the tag already exists in the remote repository
29+
if git rev-parse "v${{ env.VERSION }}" >/dev/null 2>&1; then
30+
echo "Tag v${{ env.VERSION }} already exists."
31+
else
32+
# Create and push the new tag
33+
git tag "v${{ env.VERSION }}"
34+
git push origin "v${{ env.VERSION }}"
35+
fi
36+
37+
- name: Create release
38+
if: ${{ steps.create_tag.outcome == 'success' }}
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
tag_name: "v${{ env.VERSION }}"
42+
name: "${{ github.event.pull_request.title }}"
43+
body: "${{ github.event.pull_request.body }}"
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Handle job completion
48+
if: always()
49+
run: |
50+
if [ "${{ job.status }}" == "failure" ]; then
51+
landa-messenger-api chat-send \
52+
--id "${{ secrets.CHAT_ID }}" \
53+
--api_key "${{ secrets.CHAT_KEY }}" \
54+
--title "🔴 Creation Tag Failed" \
55+
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \
56+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/tag_version_and_publish.yml" \
57+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
58+
--background_color "#55000000" \
59+
--text_color "#FFFFFFFF"
60+
elif [ "${{ job.status }}" == "cancelled" ]; then
61+
landa-messenger-api chat-send \
62+
--id "${{ secrets.CHAT_ID }}" \
63+
--api_key "${{ secrets.CHAT_KEY }}" \
64+
--title "🟠 Creation Tag Canceled" \
65+
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \
66+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/tag_version_and_publish.yml" \
67+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
68+
--background_color "#55000000" \
69+
--text_color "#FFFFFFFF"
70+
else
71+
landa-messenger-api chat-send \
72+
--id "${{ secrets.CHAT_ID }}" \
73+
--api_key "${{ secrets.CHAT_KEY }}" \
74+
--title "🟢 Creation Tag Passed" \
75+
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \
76+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/tag_version_and_publish.yml" \
77+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
78+
--background_color "#55000000" \
79+
--text_color "#FFFFFFFF"
80+
fi
81+
82+
- run: flutter pub get
83+
84+
- run: dart pub publish --dry-run
85+
86+
- run: dart pub publish -f
87+
88+
- name: Handle publish job completion
89+
if: always()
90+
run: |
91+
if [ "${{ job.status }}" == "failure" ]; then
92+
landa-messenger-api chat-send \
93+
--id "${{ secrets.CHAT_ID }}" \
94+
--api_key "${{ secrets.CHAT_KEY }}" \
95+
--title "🔴 Pub Publish Failed" \
96+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
97+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/tag_version_and_publish.yml" \
98+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
99+
--background_color "#55000000" \
100+
--text_color "#FFFFFFFF"
101+
elif [ "${{ job.status }}" == "cancelled" ]; then
102+
landa-messenger-api chat-send \
103+
--id "${{ secrets.CHAT_ID }}" \
104+
--api_key "${{ secrets.CHAT_KEY }}" \
105+
--title "🟠 Pub Publish Canceled" \
106+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
107+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/tag_version_and_publish.yml" \
108+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
109+
--background_color "#55000000" \
110+
--text_color "#FFFFFFFF"
111+
else
112+
landa-messenger-api chat-send \
113+
--id "${{ secrets.CHAT_ID }}" \
114+
--api_key "${{ secrets.CHAT_KEY }}" \
115+
--title "🟢 Pub Publish Passed" \
116+
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
117+
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/tag_version_and_publish.yml" \
118+
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
119+
--background_color "#55000000" \
120+
--text_color "#FFFFFFFF"
121+
fi
122+
123+

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 5.4.4
2+
3+
* Bump `object` version to `1.2.6`.
4+
* Bump `cloud_firestore` version to `5.4.4`.
5+
16
## 5.4.0
27

38
* Bump `object` version to `1.1.1`.

analysis_options.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
analyzer:
2+
errors:
3+
dangling_library_doc_comments: ignore
14
include: package:flutter_lints/flutter.yaml
25

3-
# Additional information about this file can be found at
4-
# https://dart.dev/guides/language/analysis-options
6+
linter:
7+
rules:
8+
avoid_print: false

lib/firebase_cloud_firestore.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library firebase_cloud_firestore;
1+
library;
22

33
export 'package:cloud_firestore/cloud_firestore.dart';
44
export 'package:object/object.dart';

lib/src/fire/firestore_collection_manager.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,13 @@ class FirestoreCollectionManager<T extends object.Object<T>>
185185
* Execute callbacks
186186
*/
187187
if (removed.isNotEmpty) await deletionCallback?.call(removed, page);
188-
if (changed.isNotEmpty)
188+
if (changed.isNotEmpty) {
189189
await callback?.call(
190-
changed, page, collectionPages[page]?.hasMore ?? false);
190+
changed,
191+
page,
192+
collectionPages[page]?.hasMore ?? false,
193+
);
194+
}
191195
}
192196

193197
Future<void> nextCollectionPage({

0 commit comments

Comments
 (0)