Skip to content

Commit

Permalink
feat: adding CI for updater tools
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzanardo committed May 20, 2024
1 parent 6ab6972 commit 8092940
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/updater_tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Updater Tools 💻

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
paths:
- ".github/updater_tools.yaml"
- "updater_tools/lib/**"
- "updater_tools/test/**"
- "updater_tools/pubspec.yaml"
push:
branches:
- main
paths:
- ".github/updater_tools.yaml"
- "updater_tools/lib/**"
- "updater_tools/test/**"
- "updater_tools/pubspec.yaml"

jobs:
semantic-pull-request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
working_directory: updater_tools
4 changes: 4 additions & 0 deletions updater_tools/lib/src/extensions/arg_results.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import 'package:args/args.dart';

/// Extension methods for validating options provided to [ArgResults].
extension ArgResultsValidation on ArgResults {
/// Returns the value of the option with the given [name] as a [File].
///
/// Throws an [ArgumentError] if the option is not present or if the file
/// does not exist.
File asExistingFile(String name) {
final file = File(this[name] as String);
if (!file.existsSync()) {
Expand Down

0 comments on commit 8092940

Please sign in to comment.