Skip to content

Commit

Permalink
Merge branch 'master' into custom-equals-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
amondnet committed Oct 3, 2022
2 parents 2fb6193 + cea7013 commit e84f05e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion flutter_mobx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.0.6+3
## 2.0.6+3 - 2.0.6+4

- Moved the version into its own file (`version.dart`) and exported from the main library file
- Bringing the `version.dart` file in sync with `pubspec.yaml`

# 2.0.6+2

Expand Down
2 changes: 1 addition & 1 deletion flutter_mobx/lib/version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!!

/// The current version as per `pubspec.yaml`.
const version = '2.0.6+3';
const version = '2.0.6+4';
2 changes: 1 addition & 1 deletion flutter_mobx/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flutter_mobx
description:
Flutter integration for MobX. It provides a set of Observer widgets that automatically rebuild
when the tracked observables change.
version: 2.0.6+3
version: 2.0.6+4

homepage: https://github.com/mobxjs/mobx.dart
issue_tracker: https://github.com/mobxjs/mobx.dart/issues
Expand Down
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ scripts:
get:
exec: dart pub get
set_version:
exec: ../tool/expose_version.dart
exec: $MELOS_ROOT_PATH/tool/expose_version.dart
generate:
run: cd mobx_examples && dart run build_runner watch --delete-conflicting-outputs

Expand Down
3 changes: 2 additions & 1 deletion mobx_codegen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.0.7+2
## 2.0.7+2 - 2.0.7+3

- Moved the version into its own file (`version.dart`) and exported from the main library file
- Bringing the `version.dart` file in sync with `pubspec.yaml`

## 2.0.7+1

Expand Down
2 changes: 1 addition & 1 deletion mobx_codegen/lib/version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!!

/// The current version as per `pubspec.yaml`.
const version = '2.0.7+2';
const version = '2.0.7+3';
2 changes: 1 addition & 1 deletion mobx_codegen/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mobx_codegen
description: Code generator for MobX that adds support for annotating your code with @observable, @computed, @action and also creating Store classes.
version: 2.0.7+2
version: 2.0.7+3

homepage: https://github.com/mobxjs/mobx.dart
issue_tracker: https://github.com/mobxjs/mobx.dart/issues
Expand Down
9 changes: 5 additions & 4 deletions tool/expose_version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
import 'dart:io';

void main() {
final pubspecFile = File('${Directory.current.path}/pubspec.yaml');
final packagePath = Directory.current.path;
final packageName = Directory.current.path.split("/").last;
final pubspecFile = File('$packagePath/pubspec.yaml');

final projectData = pubspecFile.readAsStringSync();
final versionNumber = resolveVersion(projectData);

if (versionNumber == null) {
final package = Directory.current.path.split("/").last;
print('Failed to fetch version for $package');
print('Failed to fetch version for $packageName');
exit(1);
}

final versionText = generateVersionScript(versionNumber);

final versionFile = File('${Directory.current.path}/lib/version.dart');
final versionFile = File('$packagePath/lib/version.dart');
versionFile.writeAsStringSync(versionText);
}

Expand Down

0 comments on commit e84f05e

Please sign in to comment.