Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath committed Jul 26, 2020
1 parent b32b833 commit 021304e
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Install dependencies
run: pub get
- name: Analyzer
run: dartanalyzer lib test example --fatal-infos --fatal-warnings
run: dartanalyzer lib test --fatal-infos --fatal-warnings
- name: Tests
run: pub run test
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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).

## [Unreleased]
## [0.0.1] - 2020-07-26
### Added
- Minor documentation improvements

### Fixed
- Usage exception does not print trace logs anymore

## [0.0.0+dev.2] - 2020-07-24
### Changed
- Updated dependencies
Expand All @@ -13,5 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial version

[Unreleased]: https://github.com/f3ath/cider/compare/0.0.0+dev.2...HEAD
[Unreleased]: https://github.com/f3ath/cider/compare/0.0.1...HEAD
[0.0.1]: https://github.com/f3ath/cider/compare/0.0.0+dev.2...0.0.1
[0.0.0+dev.2]: https://github.com/f3ath/cider/compare/0.0.0+dev.1...0.0.0+dev.2
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CIDER (CI for Dart. Efficient Releases)
A command-line utility to automate package maintenance. It manipulates the changelog and pubspec.yaml.
# Cider (CI for Dart. Efficient Releases)
A command-line utility to automate package maintenance. Manipulates the changelog and pubspec.yaml.

This tool assumes that the changelog:
- is called `CHANGELOG.md`
Expand All @@ -13,9 +13,17 @@ It also assumes that your project follows [Semantic Versioning v2.0.0](https://s
```
pub global activate cider
```
## Configure
The config file name is `.cider.yaml`. It should reside in the root folder of the project. This file is optional.
So far it consists of just a single entry.
```yaml
changelog:
diff_link_template: 'https://github.com/org/project/compare/%from%...%to%'
```
The `%from%` and `%to%` placeholders will be replaced with the corresponding version tags.
## Usage
### Logging changes to CHANGELOG
### Logging changes to the changelog
This command will add a new line to the `Unreleased` section of the changelog
```
cider log <type> <description>
Expand Down Expand Up @@ -75,12 +83,14 @@ cider release
Use `--date` to provide the release date (the default is today).
Cider will automatically generate the diff links in the changelog if the diff link template is found in the config.
### Printing the current project version
```
cider version
```
### Printing the list of changes in a given version
### Printing the list of changes in the given version
```
cider print <version>
```
Expand Down
13 changes: 11 additions & 2 deletions bin/cider.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import 'dart:io';

import 'package:args/command_runner.dart';
import 'package:cider/cider.dart';

void main(List<String> args) async => exit(
(await ConsoleApplication('cider').run(args)) ?? ExitCode.missingArgument);
void main(List<String> args) async {
int code;
try {
code = await ConsoleApplication('cider').run(args);
} on UsageException catch (e) {
// This avoids trace dumping
print(e);
}
exit(code ?? ExitCode.usageException);
}
2 changes: 1 addition & 1 deletion lib/src/console/command/log_change_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LogChangeCommand extends ApplicationCommand {
int run() {
if (argResults.rest.isEmpty) {
_console.error('Please specify the change description');
return ExitCode.missingArgument;
return ExitCode.usageException;
}
final app = createApp();
app.logChange(_type, argResults.rest.first);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/console/exit_code.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ExitCode {
static const ok = 0;
static const missingArgument = 1;
static const usageException = 1;
static const applicationError = 64;
}
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.0.0+dev.2
version: 0.0.1
description: Tools for Dart package maintainers. Automates CHANGLELOG and pubspec.yaml updates.
homepage: "https://github.com/f3ath/cider"

Expand Down

0 comments on commit 021304e

Please sign in to comment.