From 7b54bec6914979ac093df77f6dd58a0ff036c53f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 7 Jun 2021 11:40:37 -0700 Subject: [PATCH] use `dart pub` over just `pub` (#332) --- .github/workflows/dart.yml | 70 +++++++++---------- .travis.yml | 2 +- mono_repo/CHANGELOG.md | 4 ++ .../lib/src/commands/github/github_yaml.dart | 2 +- mono_repo/lib/src/version.dart | 2 +- mono_repo/pubspec.yaml | 2 +- .../readme_github_defaults.txt | 12 ++-- .../readme_github_lints.txt | 8 +-- tool/ci.sh | 2 +- 9 files changed, 54 insertions(+), 50 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index e69cb56a..f0e0b7fc 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v4.1.0 +# Created with package:mono_repo v4.2.0-dev name: Dart CI on: push: @@ -35,10 +35,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -67,10 +67,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -99,10 +99,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -131,10 +131,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: mono_repo; dart analyze if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -159,10 +159,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -191,10 +191,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: "mono_repo; cd ../ && dart mono_repo/bin/mono_repo.dart generate --validate" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -219,10 +219,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: "mono_repo; dart format --output=none --set-exit-if-changed ." if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -232,10 +232,10 @@ jobs: working-directory: mono_repo run: dart analyze --fatal-infos . - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -264,10 +264,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -296,10 +296,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -328,10 +328,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: "mono_repo; dart test -t yaml --test-randomize-ordering-seed=random" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -366,10 +366,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: "mono_repo; dart test -x yaml -P presubmit --test-randomize-ordering-seed=random" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -404,10 +404,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: "mono_repo; dart test -t yaml --test-randomize-ordering-seed=random" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -442,10 +442,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub upgrade + run: dart pub upgrade - name: "mono_repo; dart test -x yaml -P presubmit --test-randomize-ordering-seed=random" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -480,10 +480,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: test_pkg_pub_upgrade - name: test_pkg; pub upgrade + name: test_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: test_pkg - run: pub upgrade + run: dart pub upgrade - name: "test_pkg; dart test --test-randomize-ordering-seed=random" if: "always() && steps.test_pkg_pub_upgrade.conclusion == 'success'" working-directory: test_pkg @@ -508,10 +508,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub.bat upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub.bat upgrade + run: dart pub upgrade - name: "mono_repo; dart test -x yaml -P presubmit --test-randomize-ordering-seed=random" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo @@ -536,10 +536,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: mono_repo_pub_upgrade - name: mono_repo; pub.bat upgrade + name: mono_repo; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: mono_repo - run: pub.bat upgrade + run: dart pub upgrade - name: "mono_repo; dart test -x yaml -P presubmit --test-randomize-ordering-seed=random" if: "always() && steps.mono_repo_pub_upgrade.conclusion == 'success'" working-directory: mono_repo diff --git a/.travis.yml b/.travis.yml index 768c0d79..23ed3f4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v4.1.0 +# Created with package:mono_repo v4.2.0-dev language: dart jobs: diff --git a/mono_repo/CHANGELOG.md b/mono_repo/CHANGELOG.md index 6db21a54..87fed2e1 100644 --- a/mono_repo/CHANGELOG.md +++ b/mono_repo/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.0-dev + +- Change calls from `pub` to `dart pub` within generated scripts. + ## 4.1.0 - Improve the stability of ordering in Github workflow definitions. diff --git a/mono_repo/lib/src/commands/github/github_yaml.dart b/mono_repo/lib/src/commands/github/github_yaml.dart index dd7b0adb..d386b9ba 100644 --- a/mono_repo/lib/src/commands/github/github_yaml.dart +++ b/mono_repo/lib/src/commands/github/github_yaml.dart @@ -258,7 +258,7 @@ extension on CIJobEntry { packages ??= [job.package]; assert(packages.isNotEmpty); assert(packages.contains(job.package)); - final pubCommand = 'pub${job.os == 'windows' ? '.bat' : ''} ' + final pubCommand = 'dart pub ' '${rootConfig.monoConfig.pubAction}'; final commandEntries = <_CommandEntry>[]; diff --git a/mono_repo/lib/src/version.dart b/mono_repo/lib/src/version.dart index 2384f91a..00d82f7d 100644 --- a/mono_repo/lib/src/version.dart +++ b/mono_repo/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '4.1.0'; +const packageVersion = '4.2.0-dev'; diff --git a/mono_repo/pubspec.yaml b/mono_repo/pubspec.yaml index 794b6beb..bd32db90 100644 --- a/mono_repo/pubspec.yaml +++ b/mono_repo/pubspec.yaml @@ -2,7 +2,7 @@ name: mono_repo description: >- CLI tools to make it easier to manage a single source repository containing multiple Dart packages. -version: 4.1.0 +version: 4.2.0-dev repository: https://github.com/google/mono_repo.dart environment: diff --git a/mono_repo/test/script_integration_outputs/readme_github_defaults.txt b/mono_repo/test/script_integration_outputs/readme_github_defaults.txt index f36418da..fff14a6c 100644 --- a/mono_repo/test/script_integration_outputs/readme_github_defaults.txt +++ b/mono_repo/test/script_integration_outputs/readme_github_defaults.txt @@ -36,10 +36,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: sub_pkg_pub_upgrade - name: sub_pkg; pub upgrade + name: sub_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: sub_pkg - run: pub upgrade + run: dart pub upgrade - name: sub_pkg; dart test if: "always() && steps.sub_pkg_pub_upgrade.conclusion == 'success'" working-directory: sub_pkg @@ -64,10 +64,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: sub_pkg_pub_upgrade - name: sub_pkg; pub upgrade + name: sub_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: sub_pkg - run: pub upgrade + run: dart pub upgrade - name: sub_pkg; dart test if: "always() && steps.sub_pkg_pub_upgrade.conclusion == 'success'" working-directory: sub_pkg @@ -85,10 +85,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: sub_pkg_pub_upgrade - name: sub_pkg; pub.bat upgrade + name: sub_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: sub_pkg - run: pub.bat upgrade + run: dart pub upgrade - name: sub_pkg; dart test if: "always() && steps.sub_pkg_pub_upgrade.conclusion == 'success'" working-directory: sub_pkg diff --git a/mono_repo/test/script_integration_outputs/readme_github_lints.txt b/mono_repo/test/script_integration_outputs/readme_github_lints.txt index b3f7da61..6f1b41f1 100644 --- a/mono_repo/test/script_integration_outputs/readme_github_lints.txt +++ b/mono_repo/test/script_integration_outputs/readme_github_lints.txt @@ -57,10 +57,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: sub_pkg_pub_upgrade - name: sub_pkg; pub upgrade + name: sub_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: sub_pkg - run: pub upgrade + run: dart pub upgrade - name: sub_pkg; dart analyze if: "always() && steps.sub_pkg_pub_upgrade.conclusion == 'success'" working-directory: sub_pkg @@ -85,10 +85,10 @@ jobs: - id: checkout uses: actions/checkout@v2.3.4 - id: sub_pkg_pub_upgrade - name: sub_pkg; pub upgrade + name: sub_pkg; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: sub_pkg - run: pub upgrade + run: dart pub upgrade - name: "sub_pkg; dart format --output=none --set-exit-if-changed ." if: "always() && steps.sub_pkg_pub_upgrade.conclusion == 'success'" working-directory: sub_pkg diff --git a/tool/ci.sh b/tool/ci.sh index 845671f0..fcede2a5 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v4.1.0 +# Created with package:mono_repo v4.2.0-dev # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")