File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Release checklist
2
2
3
3
- run ` pana --no-warning ` and check score is 130/130
4
- - Bump version in ` pubspec.yaml `
5
- - Increment ` wiredashSdkVersion ` in ` lib/src/version.dart ` by ` 1 ` for patch releases, by ` 10 ` for minor releases
4
+ - Bump version with ` wiresdk bump-version --minor ` (or ` --major ` , ` --patch ` ) which does
5
+ - Bump version in ` pubspec.yaml `
6
+ - Increment ` wiredashSdkVersion ` in ` lib/src/version.dart ` by ` 1 ` for patch releases, by ` 10 ` for minor releases
7
+ - Update version in ` README.md `
6
8
- Set ` kDevMode ` in ` lib/src/_wiredash_internal.dart ` to ` false `
7
9
- Write release notes in ` CHANGELOG.md ` (Check https://github.com/wiredashio/wiredash-sdk/compare/v1.0.0...stable to compare what changed)
8
10
- Commit changes
Original file line number Diff line number Diff line change @@ -80,18 +80,24 @@ Future<void> bumpReadme(
80
80
) async {
81
81
final readme = package.root.file ('README.md' );
82
82
final content = readme.readAsStringSync ();
83
- final minorRelease = '${newVersion .major }.${newVersion .minor }.0' ;
84
- if (Version .parse (minorRelease) <= newVersion) {
83
+ final oldMinorRelease =
84
+ Version .parse ('${oldVersion .major }.${oldVersion .minor }.0' );
85
+ final newMinorRelease =
86
+ Version .parse ('${newVersion .major }.${newVersion .minor }.0' );
87
+ if (oldMinorRelease == newMinorRelease) {
85
88
print ("Not updating version in README.md, "
86
- "because it's not a major or minor version bump" );
89
+ "because it's not a major or minor version bump (old: $ oldVersion , new: $ newVersion ) " );
87
90
return ;
88
91
}
89
92
93
+ print (
94
+ 'Bumping version in README.md to ${newMinorRelease .canonicalizedVersion }' );
90
95
final versionRegex = RegExp (r'wiredash:\s*\^(.+)' );
91
96
final update = content.replaceAllMapped (
92
97
versionRegex,
93
98
(match) {
94
- return match[0 ]! .replaceFirst (match[1 ]! , minorRelease);
99
+ return match[0 ]!
100
+ .replaceFirst (match[1 ]! , newMinorRelease.canonicalizedVersion);
95
101
},
96
102
);
97
103
readme.writeAsStringSync (update);
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ executables:
11
11
12
12
dependencies :
13
13
dcli : ^2.2.3
14
- phntmxyz_bump_version_sidekick_plugin : ^1.2.0
14
+ phntmxyz_bump_version_sidekick_plugin : ^1.2.1
15
15
sidekick_core : ^2.1.0
16
16
17
17
dev_dependencies :
You can’t perform that action at this time.
0 commit comments