Skip to content

Commit

Permalink
optimize ci sh
Browse files Browse the repository at this point in the history
  • Loading branch information
aprosail committed Jun 28, 2024
1 parent c8f81e8 commit e2f8918
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/review.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: review
name: review.sh

on:
push: {branches: ["main", "dev"]}
Expand All @@ -10,4 +10,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- run: sh review.sh
- run: sh ci/review.sh
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.1

- Optimize ci sh.

## 0.1.0

- Establish basic repo including manifest, testings, and ci.
Expand Down
3 changes: 3 additions & 0 deletions ci/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd example
sh ci/gen.sh
cd ..
6 changes: 6 additions & 0 deletions ci/review.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dart pub get || exit 1
dart format --output=none --set-exit-if-changed . || exit 1
dart analyze --fatal-infos || exit 1
sh ci/gen.sh || exit 1
dart test test/*.dart || exit 1
dart pub publish --dry-run || exit 1
2 changes: 2 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore generated file managed by program.
lib/manifest.dart
3 changes: 3 additions & 0 deletions example/ci/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output="lib/manifest.dart"
dart run manifest --output $output || exit 1
dart format --output=none --set-exit-if-changed $output || exit 1
7 changes: 0 additions & 7 deletions example/lib/manifest.dart

This file was deleted.

3 changes: 2 additions & 1 deletion example/test/example_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:manifest_example/example.dart';
import 'package:test/test.dart';

void main() {
test('manifest gen', () {
// Such test must run after generating the manifest file.
test('manifest gen.sh.sh', () {
expect(manifest.name, 'manifest_example');
expect(manifest.version, '1.2.3-pre-4.5');
expect(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: manifest
description: >-
A command line tool to generate Dart package manifest from pubspec.yaml.
version: 0.1.0
version: 0.1.1
homepage: https://github.com/treeinfra/manifest
environment: {sdk: ^3.4.3}
topics:
Expand Down
16 changes: 0 additions & 16 deletions review.sh

This file was deleted.

0 comments on commit e2f8918

Please sign in to comment.