Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
Update exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
rk0cc committed Jan 28, 2023
1 parent 8ca7832 commit 1ec8d5d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.0-beta.2

* Changes exit code for different results.

## 1.0.0-beta.1

* First pre-release of Asserest
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,23 @@ dart compile exe bin/asserest.dart --output='out/'

The compiled binary will be generated under `out` directory.

## Import as library

Dart (or Flutter) allows import library from Git directly. In the project's `pubspec.yaml`,
you need to insert this property under `dependencies`:

```yaml
# Name, description and other mandatory stuff
dependencies:
asserest:
git:
url: https://github.com/rk0cc/asserest.git
ref: 1.0.0-beta.2 # It's better to uses tag's name.
# Additional settings (e.g. `flutter`)
```

Then, run `pub get` command if necessary.

## License

* Under `bin` directory: MIT License
Expand Down
7 changes: 5 additions & 2 deletions bin/asserest.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ List<dynamic> _resolveConfig(List<String> arguments) {
} on FormatException catch (err) {
print(err.message);
print("Type 'asserest -h' to display command usages");
exit(1);
exit(2);
}

if (args["version"]) {
Expand Down Expand Up @@ -87,7 +87,7 @@ List<dynamic> _resolveConfig(List<String> arguments) {
} on StateError catch (err) {
print(err.message);
print("Type 'asserest -h' to display command usages");
exit(2);
exit(3);
}
}

Expand Down Expand Up @@ -126,6 +126,8 @@ void main(List<String> arguments) async {
..writeln();

print(buf);

exit(analyser.failureCount > 0 ? 1 : 0);
}

testProc
Expand All @@ -135,5 +137,6 @@ void main(List<String> arguments) async {
await tester.close();

print(err);
exit(4);
});
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: asserest
description: Console application for verifing provided address can be access on client network
publish_to: 'none'
version: 1.0.0-beta.1
version: 1.0.0-beta.2
repository: https://github.com/rk0cc/asserest
environment:
sdk: '>2.18.999 <4.0.0'
Expand Down

0 comments on commit 1ec8d5d

Please sign in to comment.