@@ -16,6 +16,10 @@ const _targetPubspecYaml = './pubspec.yaml';
16
16
// The flutter_quill CHANGELOG
17
17
const _targetChangelog = './CHANGELOG.md' ;
18
18
19
+ const _exampleDirectory = './example' ;
20
+
21
+ const _targetExamplePubspecLock = '$_exampleDirectory /pubspec.lock' ;
22
+
19
23
const _confirmPublishOptionName = 'Y' ;
20
24
21
25
const _mainGitRemote = 'origin' ;
@@ -26,8 +30,8 @@ const _githubRepoActionsLink =
26
30
const _changelogAndPubspecRestoreMessage =
27
31
'ℹ️ Changes to CHANGELOG.md and pubspec.yaml have not been reverted.\n '
28
32
'To revert them, run:\n '
29
- 'git restore --staged $_targetChangelog $_targetPubspecYaml \n '
30
- 'git restore $_targetChangelog $_targetPubspecYaml ' ;
33
+ 'git restore --staged $_targetChangelog $_targetPubspecYaml $ _targetExamplePubspecLock \n '
34
+ 'git restore $_targetChangelog $_targetPubspecYaml $ _targetExamplePubspecLock ' ;
31
35
32
36
void main (List <String > args) {
33
37
print ('➡️ Arguments provided: $args ' );
@@ -76,7 +80,16 @@ void main(List<String> args) {
76
80
);
77
81
78
82
try {
79
- Process .runSync ('git' , ['add' , _targetPubspecYaml, _targetChangelog]);
83
+ // To update pubspec.lock of the example
84
+ print (
85
+ 'ℹ️ Running `flutter pub get` in the example directory to update `pubspec.lock`...' ,
86
+ );
87
+ Process .runSync ('flutter' , ['pub' , 'get' , '-C' , _exampleDirectory]);
88
+
89
+ Process .runSync (
90
+ 'git' ,
91
+ ['add' , _targetPubspecYaml, _targetChangelog, _targetExamplePubspecLock],
92
+ );
80
93
81
94
if (_isGitClean ()) {
82
95
print (
0 commit comments