diff --git a/.vscode/launch.json b/.vscode/launch.json index cfe3049a..dc4c34b9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "configurations": [ { "name": "health", - "program": "pkgs/firehose/bin/health.dart", + "program": "${workspaceFolder}/pkgs/firehose/bin/health.dart", "request": "launch", "type": "dart", "env": { @@ -16,9 +16,9 @@ "GITHUB_STEP_SUMMARY": "/tmp/github_step_summary_mock.md", }, "args": [ - "--checks", - "version,changelog,license,coverage,do-not-submit,leaking" - ] + "--check", + "breaking" + ], } ] -} \ No newline at end of file +} diff --git a/pkgs/firehose/CHANGELOG.md b/pkgs/firehose/CHANGELOG.md index 4988a360..5ca0551b 100644 --- a/pkgs/firehose/CHANGELOG.md +++ b/pkgs/firehose/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.0.0-wip +## 0.10.3 + +- Fix dart_apitool invocation in pub workspaces. ## 0.10.2 diff --git a/pkgs/firehose/lib/src/health/health.dart b/pkgs/firehose/lib/src/health/health.dart index 67089114..695bb7c0 100644 --- a/pkgs/firehose/lib/src/health/health.dart +++ b/pkgs/firehose/lib/src/health/health.dart @@ -158,8 +158,7 @@ class Health { log('This list of Flutter packages is $flutterPackages'); for (var package in packagesContaining(filesInPR, ignore: ignored)) { log('Look for changes in $package'); - var relativePath = - path.relative(package.directory.path, from: directory.path); + final absolutePath = package.directory.absolute.path; var tempDirectory = Directory.systemTemp.createTempSync(); var reportPath = path.join(tempDirectory.path, 'report.json'); @@ -185,7 +184,7 @@ class Health { 'diff', '--no-check-sdk-version', ...['--old', getCurrentVersionOfPackage(package)], - ...['--new', relativePath], + ...['--new', absolutePath], ...['--report-format', 'json'], ...['--report-file-path', reportPath], ], @@ -273,8 +272,7 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()} log(''); log('--- ${package.name} ---'); log('Look for leaks in ${package.name}'); - var relativePath = - path.relative(package.directory.path, from: directory.path); + final absolutePath = package.directory.absolute.path; var tempDirectory = Directory.systemTemp.createTempSync(); var reportPath = path.join(tempDirectory.path, 'leaks.json'); @@ -295,7 +293,7 @@ ${changeForPackage.entries.map((e) => '|${e.key.name}|${e.value.toMarkdownRow()} ...['pub', 'global', 'run'], 'dart_apitool:main', 'extract', - ...['--input', relativePath], + ...['--input', absolutePath], ...['--output', reportPath], ]; var runApiTool = runDashProcess( diff --git a/pkgs/firehose/pubspec.yaml b/pkgs/firehose/pubspec.yaml index dde1a039..88375b92 100644 --- a/pkgs/firehose/pubspec.yaml +++ b/pkgs/firehose/pubspec.yaml @@ -1,6 +1,6 @@ name: firehose description: A tool to automate publishing of Pub packages from GitHub actions. -version: 1.0.0-wip +version: 0.10.3 repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose environment: