Skip to content

Commit

Permalink
v0.2.7 (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath authored Mar 1, 2024
1 parent 758ed2e commit e2a0462
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 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.7] - 2024-03-01
### Fixed
- The log command used to accept any prefix as an alias, this was broken in 0.2.6

## [0.2.6] - 2024-02-03
### Fixed
- Made `bump` and `log` proper subcommands to improve UX ([PR](https://github.com/f3ath/cider/pull/70) by [marvin-kolja](https://github.com/marvin-kolja))
Expand Down Expand Up @@ -116,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial version

[0.2.7]: https://github.com/f3ath/cider/compare/0.2.6...0.2.7
[0.2.6]: https://github.com/f3ath/cider/compare/0.2.5...0.2.6
[0.2.5]: https://github.com/f3ath/cider/compare/0.2.4...0.2.5
[0.2.4]: https://github.com/f3ath/cider/compare/0.2.3...0.2.4
Expand Down
10 changes: 5 additions & 5 deletions lib/src/cli/command/log_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ class LogCommand extends CiderCommand {
}

enum LogType {
fix('Add a new bug fix to the changelog'),
add('Add a new feature to the changelog'),
change('Add a new change to the changelog'),
deprecate('Add a new deprecation to the changelog'),
remove('Add a new removal to the changelog'),
fixed('Add a new bug fix to the changelog'),
added('Add a new feature to the changelog'),
changed('Add a new change to the changelog'),
deprecated('Add a new deprecation to the changelog'),
removed('Add a new removal to the changelog'),
security('Add a new security fix to the changelog');

const LogType(this.description);
Expand Down
13 changes: 12 additions & 1 deletion lib/src/cli/command/log_sub_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ import 'package:cider/src/cli/command/cider_command.dart';

class LogSubCommand extends CiderCommand {
LogSubCommand(this.name, this.description, this.type, Console console)
: super(console);
: super(console) {
// Allow any prefix to be used as an alias. e.g.:
// cider log a "Changes added"
// cider log fix "Bug fixed"
// cider log sec "Security fix"
for (int i = 1; i < name.length; i++) {
aliases.add(name.substring(0, i));
}
}

@override
final aliases = <String>[];

@override
final String name;
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.6
version: 0.2.7
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
4 changes: 2 additions & 2 deletions test/functional_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void main() {
});

test('Full release cycle', () async {
final code = await run(['log', 'add', 'Initial release']);
final code = await run(['log', 'a', 'Initial release']); // prefix must work
expect(code, 0);
await run(['describe']);
final step1 = '''
Expand All @@ -88,7 +88,7 @@ void main() {
[1.0.0]: https://github.com/example/project/releases/tag/1.0.0
''';
expect(out.buffer.toString(), step2);
await run(['log', 'change', 'New turbo V6 engine installed']);
await run(['log', 'changed', 'New turbo V6 engine installed']);
await run(['log', 'fix', 'Wheels falling off sporadically']);
await run(['preamble', 'I love my dog.']);
final step3Body = '''
Expand Down

0 comments on commit e2a0462

Please sign in to comment.