Skip to content

Commit

Permalink
🐛 fix build command and embedded version
Browse files Browse the repository at this point in the history
  • Loading branch information
BirjuVachhani committed Mar 31, 2020
1 parent ccb411b commit f94a48d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.4.1

- Fix build command failing when there's no test generation specified
- Fix embedded version
- Added test to make sure that release version and embedded version matches

## 0.4.0

- Spider now allows to specify multiple paths to generate dart
Expand Down
2 changes: 1 addition & 1 deletion lib/src/spider_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SpiderConfiguration {
SpiderConfiguration({this.generateTests, this.groups});

SpiderConfiguration.fromJson(Map<String, dynamic> json) {
generateTests = json['generate_tests'];
generateTests = json['generate_tests'] ?? false;
if (json['groups'] != null) {
groups = <AssetGroup>[];
json['groups'].forEach((v) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: spider
description: A small dart command-line tool for generating dart references of assets from the assets folder.
version: 0.4.0
version: 0.4.1
homepage: https://github.com/BirjuVachhani/spider

environment:
Expand Down
13 changes: 13 additions & 0 deletions test/version_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

import 'dart:io';

import 'package:spider/src/version.dart';
import 'package:test/test.dart';
import 'package:yaml/yaml.dart';

void main(){
test('checks for embedded version to match with pubspec version̥',(){
final pubspec = loadYaml(File('pubspec.yaml').readAsStringSync());
expect(pubspec['version'].toString(), packageVersion);
});
}

0 comments on commit f94a48d

Please sign in to comment.