Skip to content

Commit

Permalink
v0.2.1 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath authored Jun 11, 2023
1 parent 0626056 commit 87c5dbc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.1] - 2023-06-11
### Fixed
- "Error: No value found at /cider" when run with no configuration in pubspec.yaml

## [0.2.0] - 2023-06-10
### Added
- The `list` command to list all versions from the changelog.
Expand Down Expand Up @@ -91,6 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial version

[0.2.1]: https://github.com/f3ath/cider/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/f3ath/cider/compare/0.1.6...0.2.0
[0.1.6]: https://github.com/f3ath/cider/compare/0.1.5...0.1.6
[0.1.5]: https://github.com/f3ath/cider/compare/0.1.4...0.1.5
Expand Down
2 changes: 1 addition & 1 deletion lib/src/cli/command/cider_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class CiderCommand extends Command<int> {
Future<Config> _readConfigFromPubspec(String projectRoot) async {
final pubspec =
loadYaml(await pubspecFile(projectRoot).readAsString()) as Map;
final config = pubspec.read<Map>('/cider');
final config = pubspec.read<Map>('/cider', orElse: () => {});
final diffTemplate =
config.read<String>('/link_template/diff', orElse: () => '');
final tagTemplate =
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cider
version: 0.2.0
version: 0.2.1
description: Tools for Dart package maintainers. Automates changelog and pubspec updates.
homepage: https://github.com/f3ath/cider
repository: https://github.com/f3ath/cider
Expand Down
8 changes: 8 additions & 0 deletions test/functional_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ void main() {
});
});

test('Can run without config', () async {
final code =
await cli.run(['--project-root=test/template_no_config', 'version']);

expect(code, equals(0));
expect(out.buffer.toString(), equals('1.2.3-alpha+42\n'));
});

test('Usage exception', () async {
final code = await run(['foo']);
expect(code, equals(64));
Expand Down
3 changes: 3 additions & 0 deletions test/template_no_config/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: test
version: 1.2.3-alpha+42
description: Test project

0 comments on commit 87c5dbc

Please sign in to comment.