Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg chore v2 #5

Merged
merged 18 commits into from
Oct 17, 2024
9 changes: 3 additions & 6 deletions .github/workflows/package_chore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/chore
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/chore
- run: ./dev.sh check --packages packages/chore
- run: ./dev.sh test --packages packages/chore
9 changes: 3 additions & 6 deletions .github/workflows/package_iota.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/iota
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- uses: browser-actions/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/iota
- run: ./dev.sh check --packages packages/iota
- run: ./dev.sh test --packages packages/iota
9 changes: 3 additions & 6 deletions .github/workflows/package_jsonut.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/jsonut
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/jsonut
- run: ./dev.sh check --packages packages/jsonut
- run: ./dev.sh test --packages packages/jsonut
9 changes: 3 additions & 6 deletions .github/workflows/package_lore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/lore
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/lore
- run: ./dev.sh check --packages packages/lore
- run: ./dev.sh test --packages packages/lore
9 changes: 3 additions & 6 deletions .github/workflows/package_mansion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/mansion
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/mansion
- run: ./dev.sh check --packages packages/mansion
- run: ./dev.sh test --packages packages/mansion
9 changes: 3 additions & 6 deletions .github/workflows/package_oath.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/oath
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/oath
- run: ./dev.sh check --packages packages/oath
- run: ./dev.sh test --packages packages/oath
9 changes: 3 additions & 6 deletions .github/workflows/package_proc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/proc
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/proc
- run: ./dev.sh check --packages packages/proc
- run: ./dev.sh test --packages packages/proc
24 changes: 24 additions & 0 deletions .github/workflows/package_quirk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: package/quirk

on:
# Post-submit.
push:
branches: [ main ]

# Pre-submit.
pull_request:
branches: [ main ]
paths:
- .github/workflows/package_quirk.yaml
- packages/quirk/**

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
working-directory: packages/quirk
- run: ./dev.sh check --packages packages/quirk
- run: ./dev.sh test --packages packages/quirk
9 changes: 3 additions & 6 deletions .github/workflows/package_sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/sdk
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/sdk
- run: ./dev.sh check --packages packages/sdk
- run: ./dev.sh test --packages packages/sdk
9 changes: 3 additions & 6 deletions .github/workflows/package_webby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/webby
steps:
- uses: actions/[email protected]
- uses: dart-lang/[email protected]
- uses: browser-actions/[email protected]
- run: dart pub get
- run: dart format --output none --set-exit-if-changed .
- run: dart analyze
- run: dart test
working-directory: packages/webby
- run: ./dev.sh check --packages packages/webby
- run: ./dev.sh test --packages packages/webby
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ A wide but independent collection of Dart packages and projects.

| Project | Release | Description |
|:--------|:--------|:------------|
| [`chore`](./packages/chore) | [![Pub version for package/chore](https://img.shields.io/pub/v/chore?label=%20)](https://pub.dev/packages/chore) | Opinionated project management. |
| [`chore`](./packages/chore) | _Unreleased_ | Opinionated project management. |
| [`iota`](./packages/iota) | [![Pub version for package/iota](https://img.shields.io/pub/v/iota?label=%20)](https://pub.dev/packages/iota) | Minimalist file system API. |
| [`jsonut`](./packages/jsonut) | [![Pub version for package/jsonut](https://img.shields.io/pub/v/jsonut?label=%20)](https://pub.dev/packages/jsonut) | Minimal JSON utilities. |
| [`lore`](./packages/lore) | [![Pub version for package/lore](https://img.shields.io/pub/v/lore?label=%20)](https://pub.dev/packages/lore) | Fast, structured, and idiomatic logging. |
| [`mansion`](./packages/mansion) | [![Pub version for package/mansion](https://img.shields.io/pub/v/mansion?label=%20)](https://pub.dev/packages/mansion) | Create and parse ANSI escape codes. |
| [`oath`](./packages/oath) | [![Pub version for package/oath](https://img.shields.io/pub/v/oath?label=%20)](https://pub.dev/packages/oath) | Strict linting for Dart packages. |
| [`proc`](./packages/proc) | [![Pub version for package/proc](https://img.shields.io/pub/v/proc?label=%20)](https://pub.dev/packages/proc) | Extensible process management. |
| [`sdk`](./packages/sdk) | _Unreleased_ | Utilities for finding and using the Dart SDK programmatically. |
| [`quirk`](./packages/quirk) | _Unreleased_ | Common utilities. |
| [`sdk`](./packages/sdk) | _Unreleased_ | Dart SDK utilities. |
| [`webby`](./packages/webby) | [![Pub version for package/webby](https://img.shields.io/pub/v/webby?label=%20)](https://pub.dev/packages/webby) | Hand-crafted interop for web apps. |

<!-- #endregion -->
2 changes: 1 addition & 1 deletion dev.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

# A development script for managing this monorepo.
# Requires the Dart SDK to be installed.
Expand Down
29 changes: 28 additions & 1 deletion dev/bin/dev.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
#!/usr/bin/env dart

import 'dart:io' as io;

import 'package:args/args.dart';
import 'package:chore/chore.dart';
import 'package:dev/src/runner.dart';

void main(List<String> args) async {
await Runner().run(args);
// Find the root directory of the repository.
final root = await findRootDir(package: 'pub.lurey.dev');
if (root == null) {
io.stderr.writeln('No repository found.');
io.exitCode = 1;
return;
}

final workspace = await Workspace.resolve(root);
final available = workspace.packages.where((p) => p != 'dev').toSet();

final earlyArgs = ArgParser();
Context.registerArgs(earlyArgs, packages: available);
final argResults = earlyArgs.parse(args);

await Runner(
await Context.resolve(
argResults,
root,
availablePackages: available,
),
systemEnvironment,
availablePackages: available,
).run(args);
}
10 changes: 0 additions & 10 deletions dev/lib/src/commands/check.dart

This file was deleted.

15 changes: 0 additions & 15 deletions dev/lib/src/commands/coverage.dart

This file was deleted.

Loading