Replace `devtools_tool` exe with shorthand `dt` (#8403)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index f3b0e91..9cc93ff 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -165,7 +165,7 @@
env:
WORKFLOW_ID: ${{ github.run_id }}
run: |
- echo "::notice title=To Quickly Fix Goldens:: Run \`devtools_tool fix-goldens --run-id=$WORKFLOW_ID\` on your local branch."
+ echo "::notice title=To Quickly Fix Goldens:: Run \`dt fix-goldens --run-id=$WORKFLOW_ID\` on your local branch."
devtools-app-integration-test:
name: devtools_app integration-test ${{ matrix.bot }} - ${{ matrix.device }} - shard ${{ matrix.shard }}
diff --git a/.github/workflows/daily-dev-bump.yaml b/.github/workflows/daily-dev-bump.yaml
index 6dfa383..50759c7 100644
--- a/.github/workflows/daily-dev-bump.yaml
+++ b/.github/workflows/daily-dev-bump.yaml
@@ -63,10 +63,10 @@
dart pub get
popd
- # Ensure the devtools_tool command is available
+ # Ensure the dt command is available
export PATH="$PATH":`pwd`/tool/bin
- ORIGINAL_VERSION=$(devtools_tool update-version current-version | tail -1)
+ ORIGINAL_VERSION=$(dt update-version current-version | tail -1)
if [ -z "$UPDATE_TYPE" ]; then
# If $UPDATE_TYPE is not set, then assume it is dev
@@ -76,14 +76,14 @@
# If there is a major, minor, or patch bump, do it.
if [ "$UPDATE_TYPE" == "patch+dev" ]; then
- devtools_tool update-version auto --type patch
- devtools_tool update-version auto --type dev
+ dt update-version auto --type patch
+ dt update-version auto --type dev
elif [ "$UPDATE_TYPE" == "minor+dev" ]; then
- devtools_tool update-version auto --type minor
- devtools_tool update-version auto --type dev
+ dt update-version auto --type minor
+ dt update-version auto --type dev
elif [ "$UPDATE_TYPE" == "major+dev" ]; then
- devtools_tool update-version auto --type major
- devtools_tool update-version auto --type dev
+ dt update-version auto --type major
+ dt update-version auto --type dev
elif [ "$UPDATE_TYPE" == "dev" ]; then
if ! echo "$ORIGINAL_VERSION" | grep -Eq "\-dev\.[0-9]+" ; then
ERROR_DESCRIPTION="Doing \
@@ -94,13 +94,13 @@
echo "::error ,title=Cannot do a dev bump on a Release Version ($ORIGINAL_VERSION)::$ERROR_DESCRIPTION"
exit 1;
fi
- devtools_tool update-version auto --type dev
+ dt update-version auto --type dev
else
echo "ERROR: UNEXPECTED UPDATE TYPE: $UPDATE_TYPE"
exit 1
fi
- NEW_VERSION=$(devtools_tool update-version current-version | tail -1)
+ NEW_VERSION=$(dt update-version current-version | tail -1)
echo "COMMIT_MESSAGE=Updating from $ORIGINAL_VERSION to $NEW_VERSION" >> $GITHUB_OUTPUT
env:
diff --git a/BETA_TESTING.md b/BETA_TESTING.md
index 57df2d1..a60344c 100644
--- a/BETA_TESTING.md
+++ b/BETA_TESTING.md
@@ -47,7 +47,7 @@
- Make sure to [configure Git to keep your fork in sync](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository)
with the upstream DevTools repo.
-2. Ensure that you have access to the `devtools_tool` executable by:
+2. Ensure that you have access to the `dt` executable by:
- Running `flutter pub get` on the `devtools/tool` directory
- Adding the `devtools/tool/bin` folder to your `PATH` environment variable:
- **MacOS Users**
@@ -63,7 +63,7 @@
- Click the **New** button and paste in `<DEVTOOLS_DIR>/tool/bin`, replacing `<DEVTOOLS_DIR>`
with the local path to your DevTools repo.
- Explore the commands and helpers that the `devtools_tool` provides by running `devtools_tool -h`.
+ Explore the commands and helpers that the `dt` provides by running `dt -h`.
## Prepare to build DevTools
@@ -73,8 +73,8 @@
git checkout master
git reset --hard origin/master
-devtools_tool update-flutter-sdk
-devtools_tool pub-get --only-main --upgrade
+dt update-flutter-sdk
+dt pub-get --only-main --upgrade
```
## Start DevTools and connect to an app
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5dff668..af2673f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -58,7 +58,7 @@
to connect to Github with SSH.
2. Make sure to [configure Git to keep your fork in sync](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository)
with the upstream DevTools repo.
-3. Ensure that you have access to the `devtools_tool` executable by:
+3. Ensure that you have access to the DevTools repo management tool exectuable, `dt`:
- Running `flutter pub get` on the `devtools/tool` directory
- Adding the `devtools/tool/bin` folder to your `PATH` environment variable:
- **MacOS Users**
@@ -74,7 +74,7 @@
- Click the **New** button and paste in `<DEVTOOLS_DIR>/tool/bin`, replacing `<DEVTOOLS_DIR>`
with the local path to your DevTools repo.
- Explore the commands and helpers that `devtools_tool` provides by running `devtools_tool -h`.
+ Explore the commands and helpers that `dt` provides by running `dt -h`.
4. **Optional:** enable and activate DCM (Dart Code Metrics) - see the [DCM section below](#enable-and-activate-dcm-dart-code-metrics)
#### Set up your IDE
@@ -88,13 +88,13 @@
### Workflow for making changes
-1. Change your local Flutter SDK to the latest flutter candidate branch: `devtools_tool update-flutter-sdk --from-path`
+1. Change your local Flutter SDK to the latest flutter candidate branch: `dt update-flutter-sdk --from-path`
> Note: Until https://github.com/flutter/devtools/issues/7939 is fixed, run
-`devtools_tool update-flutter-sdk --use-cache` instead.
+`dt update-flutter-sdk --use-cache` instead.
2. Create a branch from your cloned DevTools repo: `git checkout -b myBranch`
-3. Ensure your branch, dependencies, and generated code are up-to-date: `devtools_tool sync`
+3. Ensure your branch, dependencies, and generated code are up-to-date: `dt sync`
4. Implement your changes, and commit to your branch: `git commit -m “description”`
- If your improvement is user-facing, [document it](packages/devtools_app/release_notes/README.md) in the same PR.
5. Push to your branch to GitHub: `git push origin myBranch`
@@ -112,13 +112,13 @@
- If at any time you need to re-sync your branch, run:
```
- devtools_tool sync
+ dt sync
```
This will pull the latest code from the upstream DevTools, upgrade dependencies, and perform code generation.
- If you want to upgrade dependencies and re-generate code (like mocks), but do not want to merge `upstream/master`, instead run
```
- devtools_tool generate-code --upgrade
+ dt generate-code --upgrade
```
- To update DCM to the same version as on GitHub bots with apt-get or brew:
@@ -171,7 +171,7 @@
Then you can run DevTools with the server by running the following from the top-level `devtools` directory:
```
-devtools_tool serve
+dt serve
```
### DevTools + VS Code integration (IDE-embedded DevTools experience)
@@ -195,7 +195,7 @@
},
```
-This instructs VS Code to run the `devtools_tool serve` command instead of running `dart devtools`.
+This instructs VS Code to run the `dt serve` command instead of running `dart devtools`.
You must set the `LOCAL_DART_SDK` and `FLUTTER_ROOT` env variables correctly for the script to work.
Next, restart VS Code (or run the **Developer: Reload Window** command from the command palette (`F1`))
diff --git a/TESTING.md b/TESTING.md
index 2a2a0f7..1d61b98 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -24,15 +24,15 @@
the CI. To update your local flutter version, run:
```shell
-devtools_tool update-flutter-sdk --update-on-path
+dt update-flutter-sdk --update-on-path
```
-> Note: Running this command requires that you have followed the [set up instructions](CONTRIBUTING.md#set-up-your-devtools-environment) in the DevTools contributing guide regarding cloning the Flutter SDK from GitHub, adding the `devtools_tool` executable to your PATH, and running `dart pub get` in the `tool` directory.
+> Note: Running this command requires that you have followed the [set up instructions](CONTRIBUTING.md#set-up-your-devtools-environment) in the DevTools contributing guide regarding cloning the Flutter SDK from GitHub, adding the `dt` executable to your PATH, and running `dart pub get` in the `tool` directory.
You may need to re-generate the testing mocks before running the tests:
```shell
-devtools_tool generate-code --upgrade
+dt generate-code --upgrade
```
Now you can proceed with running DevTools tests:
@@ -71,7 +71,7 @@
on the CI. To update your local flutter version, run:
```shell
- devtools_tool update-flutter-sdk --update-on-path
+ dt update-flutter-sdk --update-on-path
```
- Then proceed with updating the goldens:
diff --git a/packages/devtools_app/lib/src/shared/development_helpers.dart b/packages/devtools_app/lib/src/shared/development_helpers.dart
index 4cfb1f4..15af867 100644
--- a/packages/devtools_app/lib/src/shared/development_helpers.dart
+++ b/packages/devtools_app/lib/src/shared/development_helpers.dart
@@ -24,11 +24,11 @@
/// the Dart Tooling Daemon.
///
/// Without using this flag, you would need to run DevTools with the DevTools
-/// server (devtools_tool serve) in order to pass a DTD URI to the DevTools
+/// server (dt serve) in order to pass a DTD URI to the DevTools
/// server, which is not convenient for development.
///
/// If you do need the DevTools server, then you should run
-/// `devtools_tool serve --dtd-uri=<uri>` instead of setting this debug flag.
+/// `dt serve --dtd-uri=<uri>` instead of setting this debug flag.
///
/// You can use a real DTD URI from an IDE (VS Code or IntelliJ / Android
/// Studio) using the "Copy DTD URI" action, or you can run a Dart or Flutter
diff --git a/packages/devtools_app/pubspec.yaml b/packages/devtools_app/pubspec.yaml
index 570af1c..e8545c9 100644
--- a/packages/devtools_app/pubspec.yaml
+++ b/packages/devtools_app/pubspec.yaml
@@ -109,7 +109,7 @@
- packages/perfetto_ui_compiled/dist/devtools/devtools_shared.css
- packages/perfetto_ui_compiled/dist/devtools/devtools_theme_handler.js
# The version number for all the Perfetto asset paths below is updated by running
- # `devtools_tool update-perfetto`.
+ # `dt update-perfetto`.
- packages/perfetto_ui_compiled/dist/v34.0-16f63abe3/engine_bundle.js
- packages/perfetto_ui_compiled/dist/v34.0-16f63abe3/frontend_bundle.js
- packages/perfetto_ui_compiled/dist/v34.0-16f63abe3/manifest.json
diff --git a/packages/devtools_app/release_notes/README.md b/packages/devtools_app/release_notes/README.md
index 5d8506e..478ae22 100644
--- a/packages/devtools_app/release_notes/README.md
+++ b/packages/devtools_app/release_notes/README.md
@@ -55,7 +55,7 @@
Draft release notes on a local `flutter/website` branch using the following command:
```console
-devtools_tool release-notes -w /Users/me/absolute/path/to/flutter/website
+dt release-notes -w /Users/me/absolute/path/to/flutter/website
```
Clean up the drafted notes on your local `flutter/website` branch and open a PR.
diff --git a/packages/devtools_test/lib/src/mocks/generated.dart b/packages/devtools_test/lib/src/mocks/generated.dart
index 745cc24..a6ac4d7 100644
--- a/packages/devtools_test/lib/src/mocks/generated.dart
+++ b/packages/devtools_test/lib/src/mocks/generated.dart
@@ -8,7 +8,7 @@
import 'package:vm_service/vm_service.dart';
// See https://github.com/dart-lang/mockito/blob/master/NULL_SAFETY_README.md
-// Run `devtools_tool generate-code` to regenerate mocks.
+// Run `dt generate-code` to regenerate mocks.
@GenerateNiceMocks([
MockSpec<ConnectedApp>(),
MockSpec<DebuggerController>(),
diff --git a/tool/RELEASE_INSTRUCTIONS.md b/tool/RELEASE_INSTRUCTIONS.md
index 5d09f3e..5f065b4 100644
--- a/tool/RELEASE_INSTRUCTIONS.md
+++ b/tool/RELEASE_INSTRUCTIONS.md
@@ -20,7 +20,7 @@
# Pre-requisites
-1. Ensure that you have access to `devtools_tool` by adding the `tool/bin` folder to your
+1. Ensure that you have access to `dt` by adding the `tool/bin` folder to your
`PATH` environment variable
- **MacOS Users**
- add the following to your `~/.bashrc` file.
@@ -73,7 +73,7 @@
2. Your Flutter SDK in `devtools/tool/flutter-sdk` and the one on PATH are updated to the latest candidate release branch:
```shell
- devtools_tool update-flutter-sdk --update-on-path
+ dt update-flutter-sdk --update-on-path
```
### Prepare the release
@@ -86,7 +86,7 @@
From the `devtools/tool` directory, run the following:
```shell
-devtools_tool release-helper
+dt release-helper
```
This command will automatically:
- create a new branch using the tip of master and check out locally
@@ -99,7 +99,7 @@
2. Update your Flutter SDK in `devtools/tool/flutter-sdk` and the one on PATH to the latest Flutter candidate:
```shell
- devtools_tool update-flutter-sdk --update-on-path --use-cache
+ dt update-flutter-sdk --update-on-path --use-cache
```
#### Verify the version changes for the Release PR
@@ -119,7 +119,7 @@
1. Build DevTools in release mode and serve it from a locally running DevTools
server instance:
```shell
- devtools_tool serve
+ dt serve
```
2. Launch DevTools and verify that everything generally works.
@@ -162,7 +162,7 @@
Run the tool script with the commit hash you just merged and tagged:
```shell
-devtools_tool update-sdk-deps -c <commit-hash>
+dt update-sdk-deps -c <commit-hash>
```
This automatically creates a Gerrit CL with the DEPS update for DevTools.
@@ -200,7 +200,7 @@
2. Then, tag the release:
```shell
- devtools_tool tag-version
+ dt tag-version
```
This command creates a tag on the `flutter/devtools` repo for this release. The
version for the tag is automatically determined from `packages/devtools/pubspec.yaml`
@@ -266,7 +266,7 @@
DevTools version number:
```
git cherry-pick <commit>
- devtools_tool update-version auto -t patch
+ dt update-version auto -t patch
```
5. Commit your changes and push to the `upstream` remote.
@@ -352,7 +352,7 @@
Check out the cherry-pick branch you created earlier, and create a git tag:
```sh
git checkout upstream/2.29.1
-devtools_tool tag-version
+dt tag-version
```
### Create the merge commit in the `flutter/devtools` repo
diff --git a/tool/bin/devtools_tool b/tool/bin/devtools_tool
index 27bb820..8b0dc67 100755
--- a/tool/bin/devtools_tool
+++ b/tool/bin/devtools_tool
@@ -1,19 +1,8 @@
#!/bin/bash -e
-SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+# This file serves as an alias for the 'dt' executable so that
+# the legacy `dt` can be used.
+# TODO(kenz): remove this file in ~6 months (April 2025).
-if [ ! -z "$DEVTOOLS_TOOL_FLUTTER_FROM_PATH" ]
-then
- echo Running devtools_tool using Dart/Flutter from PATH because DEVTOOLS_TOOL_FLUTTER_FROM_PATH is set
- dart run "$SCRIPT_DIR/devtools_tool.dart" "$@"
-else
- if [ ! -d $SCRIPT_DIR/../flutter-sdk ]
- then
- # If the `devtools/tool/flutter-sdk` directory does not exist yet, use whatever Dart
- # is on the user's path to update it before proceeding.
- echo "Running devtools_tool using the Dart SDK from `which dart` to create the Flutter SDK in tool/flutter-sdk."
- dart run "$SCRIPT_DIR/devtools_tool.dart" update-flutter-sdk
- fi
-
- "$SCRIPT_DIR/../flutter-sdk/bin/dart" run "$SCRIPT_DIR/devtools_tool.dart" "$@"
-fi
+echo Warning: devtools_tool has been replaced by dt. Please use dt instead.
+dt
diff --git a/tool/bin/devtools_tool.bat b/tool/bin/devtools_tool.bat
deleted file mode 100644
index 5e572b8..0000000
--- a/tool/bin/devtools_tool.bat
+++ /dev/null
@@ -1,18 +0,0 @@
-@echo off
-
-IF DEFINED DEVTOOLS_TOOL_FLUTTER_FROM_PATH (
- echo Running devtools_tool using Dart/Flutter from PATH because DEVTOOLS_TOOL_FLUTTER_FROM_PATH is set
- dart run %~dp0/devtools_tool.dart %*
-) ELSE (
-
- rem If the `devtools/tool/flutter-sdk` directory does not exist yet, use whatever Dart
- rem is on the user's path to update it before proceeding.
- IF NOT EXIST "%~dp0/../flutter-sdk/" (
- echo Running devtools_tool using the Dart SDK from `where.exe dart` to create the Flutter SDK in tool/flutter-sdk.
- dart run %~dp0/devtools_tool.dart update-flutter-sdk
- )
-
- %~dp0/../flutter-sdk/bin/dart run %~dp0/devtools_tool.dart %*
-)
-
-EXIT /B %errorlevel%
diff --git a/tool/bin/dt b/tool/bin/dt
new file mode 100755
index 0000000..9955ea2
--- /dev/null
+++ b/tool/bin/dt
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+if [ ! -z "$DEVTOOLS_TOOL_FLUTTER_FROM_PATH" ]
+then
+ echo Running dt using Dart/Flutter from PATH because DEVTOOLS_TOOL_FLUTTER_FROM_PATH is set
+ dart run "$SCRIPT_DIR/dt.dart" "$@"
+else
+ if [ ! -d $SCRIPT_DIR/../flutter-sdk ]
+ then
+ # If the `devtools/tool/flutter-sdk` directory does not exist yet, use whatever Dart
+ # is on the user's path to update it before proceeding.
+ echo "Running dt using the Dart SDK from `which dart` to create the Flutter SDK in tool/flutter-sdk."
+ dart run "$SCRIPT_DIR/dt.dart" update-flutter-sdk
+ fi
+
+ "$SCRIPT_DIR/../flutter-sdk/bin/dart" run "$SCRIPT_DIR/dt.dart" "$@"
+fi
diff --git a/tool/bin/dt.bat b/tool/bin/dt.bat
new file mode 100755
index 0000000..1fb971c
--- /dev/null
+++ b/tool/bin/dt.bat
@@ -0,0 +1,18 @@
+@echo off
+
+IF DEFINED DEVTOOLS_TOOL_FLUTTER_FROM_PATH (
+ echo Running dt using Dart/Flutter from PATH because DEVTOOLS_TOOL_FLUTTER_FROM_PATH is set
+ dart run %~dp0/dt.dart %*
+) ELSE (
+
+ rem If the `devtools/tool/flutter-sdk` directory does not exist yet, use whatever Dart
+ rem is on the user's path to update it before proceeding.
+ IF NOT EXIST "%~dp0/../flutter-sdk/" (
+ echo Running dt using the Dart SDK from `where.exe dart` to create the Flutter SDK in tool/flutter-sdk.
+ dart run %~dp0/dt.dart update-flutter-sdk
+ )
+
+ %~dp0/../flutter-sdk/bin/dart run %~dp0/dt.dart %*
+)
+
+EXIT /B %errorlevel%
diff --git a/tool/bin/devtools_tool.dart b/tool/bin/dt.dart
similarity index 100%
rename from tool/bin/devtools_tool.dart
rename to tool/bin/dt.dart
diff --git a/tool/build_release.sh b/tool/build_release.sh
index 4c5d2a0..a9708cb 100755
--- a/tool/build_release.sh
+++ b/tool/build_release.sh
@@ -30,7 +30,7 @@
PATH="$FLUTTER_DIR/bin":$PATH
# Make sure the flutter sdk is on the correct branch.
- devtools_tool update-flutter-sdk
+ dt update-flutter-sdk
fi
popd
@@ -58,7 +58,7 @@
flutter --help
if [[ $1 = "--update-perfetto" ]]; then
- devtools_tool update-perfetto
+ dt update-perfetto
fi
pushd $DEVTOOLS_DIR/packages/devtools_shared
diff --git a/tool/ci/bots.sh b/tool/ci/bots.sh
index 98b6d9e..88e29a2 100755
--- a/tool/ci/bots.sh
+++ b/tool/ci/bots.sh
@@ -21,13 +21,13 @@
$(dirname $(which flutter))/dart format --output=none --set-exit-if-changed .
# Make sure the app versions are in sync.
- devtools_tool repo-check
+ dt repo-check
# Get packages
- devtools_tool pub-get
+ dt pub-get
# Analyze the code
- devtools_tool analyze
+ dt analyze
elif [ "$BOT" = "build_ddc" ]; then
diff --git a/tool/ci/setup.sh b/tool/ci/setup.sh
index 44e1cde..9e7e536 100755
--- a/tool/ci/setup.sh
+++ b/tool/ci/setup.sh
@@ -66,11 +66,11 @@
flutter pub get
popd
-# Ensure the devtools_tool command is available
+# Ensure the dt command is available
export PATH="$PATH":"$DEVTOOLS_DIR/tool/bin"
# Fetch dependencies
-devtools_tool pub-get --only-main
+dt pub-get --only-main
# Generate code.
-devtools_tool generate-code
+dt generate-code
diff --git a/tool/flutter_customer_tests/analyze.sh b/tool/flutter_customer_tests/analyze.sh
index 857bd23..0af5ce4 100755
--- a/tool/flutter_customer_tests/analyze.sh
+++ b/tool/flutter_customer_tests/analyze.sh
@@ -9,6 +9,6 @@
cd tool
flutter pub get
-dart bin/devtools_tool.dart pub-get
-dart bin/devtools_tool.dart analyze --no-fatal-infos
+dart bin/dt.dart pub-get
+dart bin/dt.dart analyze --no-fatal-infos
cd ..
diff --git a/tool/flutter_customer_tests/setup.sh b/tool/flutter_customer_tests/setup.sh
index b12677d..3584ff6 100755
--- a/tool/flutter_customer_tests/setup.sh
+++ b/tool/flutter_customer_tests/setup.sh
@@ -6,10 +6,10 @@
root_dir=$(pwd)
tool_dir="$root_dir/tool/bin"
export PATH=$PATH:$tool_dir
-# Force devtools_tool to use the current Flutter (which is available on PATH).
+# Force dt to use the current Flutter (which is available on PATH).
export DEVTOOLS_TOOL_FLUTTER_FROM_PATH=true
cd tool
flutter pub get
-devtools_tool pub-get
-devtools_tool generate-code --upgrade
+dt pub-get
+dt generate-code --upgrade
cd ..
diff --git a/tool/lib/commands/build.dart b/tool/lib/commands/build.dart
index d0c8415..3a339ef 100644
--- a/tool/lib/commands/build.dart
+++ b/tool/lib/commands/build.dart
@@ -29,11 +29,11 @@
///
/// If the [BuildCommandArgs.updatePerfetto] argument is present, the
/// precompiled bits for Perfetto will be updated from the
-/// `devtools_tool update-perfetto` command as part of the DevTools build
+/// `dt update-perfetto` command as part of the DevTools build
/// process.
///
/// If [BuildCommandArgs.pubGet] argument is negated (e.g. --no-pub-get), then
-/// `devtools_tool pub-get --only-main` command will not be run before building
+/// `dt pub-get --only-main` command will not be run before building
/// the DevTools web app. Use this flag to save the cost of updating pub
/// packages if your pub cahce does not need to be updated. This is helpful when
/// developing with the DevTools server.
diff --git a/tool/lib/commands/release_helper.dart b/tool/lib/commands/release_helper.dart
index ffc6bba..cee3223 100644
--- a/tool/lib/commands/release_helper.dart
+++ b/tool/lib/commands/release_helper.dart
@@ -152,7 +152,7 @@
);
log.stdout('DONE');
log.stdout(
- 'Build, run and test this release using: `devtools_tool serve`',
+ 'Build, run and test this release using: `dt serve`',
);
} catch (e) {
log.stderr(e.toString());
diff --git a/tool/lib/commands/serve.dart b/tool/lib/commands/serve.dart
index aedb948..27daf87 100644
--- a/tool/lib/commands/serve.dart
+++ b/tool/lib/commands/serve.dart
@@ -23,14 +23,14 @@
const _serveWithDartSdkFlag = 'serve-with-dart-sdk';
/// This command builds DevTools in release mode by running the
-/// `devtools_tool build` command and then serves DevTools with a locally
+/// `dt build` command and then serves DevTools with a locally
/// running DevTools server.
///
/// If the [_buildAppFlag] argument is negated (e.g. --no-build-app), then the
/// DevTools web app will not be rebuilt before serving. The following arguments
/// are ignored if '--no-build-app' is present in the list of arguments passed
/// to this command. All of the following commands are passed along to the
-/// `devtools_tool build` command.
+/// `dt build` command.
///
/// If the [_debugServerFlag] argument is present, the DevTools server will be
/// started with the `--observe` flag. This will allow you to debug and profile
@@ -46,11 +46,11 @@
///
/// If the [BuildCommandArgs.updatePerfetto] argument is present, the
/// precompiled bits for Perfetto will be updated from the
-/// `devtools_tool update-perfetto` command as part of the DevTools build
+/// `dt update-perfetto` command as part of the DevTools build
/// process.
///
/// If [BuildCommandArgs.pubGet] argument is negated (e.g. --no-pub-get), then
-/// `devtools_tool pub-get --only-main` command will not be run before building
+/// `dt pub-get --only-main` command will not be run before building
/// the DevTools web app. Use this flag to save the cost of updating pub
/// packages if your pub cahce does not need to be updated. This is helpful when
/// developing with the DevTools server.
@@ -189,7 +189,7 @@
);
if (process.exitCode == 1) {
throw Exception(
- 'Something went wrong while running `devtools_tool build`',
+ 'Something went wrong while running `dt build`',
);
}
logStatus('completed building DevTools: $devToolsBuildLocation');
diff --git a/tool/lib/commands/shared.dart b/tool/lib/commands/shared.dart
index f6b9def..1cc9952 100644
--- a/tool/lib/commands/shared.dart
+++ b/tool/lib/commands/shared.dart
@@ -27,7 +27,7 @@
BuildCommandArgs.pubGet.flagName,
negatable: true,
defaultsTo: true,
- help: 'Whether to run `devtools_tool pub-get --only-main` before building'
+ help: 'Whether to run `dt pub-get --only-main` before building'
' the DevTools web app.',
);
}
diff --git a/tool/lib/commands/update_dart_sdk_deps.dart b/tool/lib/commands/update_dart_sdk_deps.dart
index 8a12cf9..8240fc0 100644
--- a/tool/lib/commands/update_dart_sdk_deps.dart
+++ b/tool/lib/commands/update_dart_sdk_deps.dart
@@ -19,7 +19,7 @@
/// automatically built and uploaded to CIPD on each DevTools commit.
///
/// To run this script:
-/// `devtools_tool update-sdk-deps -c <commit-hash>`
+/// `dt update-sdk-deps -c <commit-hash>`
class UpdateDartSdkDepsCommand extends Command {
UpdateDartSdkDepsCommand() {
argParser.addOption(
diff --git a/tool/lib/commands/update_flutter_sdk.dart b/tool/lib/commands/update_flutter_sdk.dart
index 5045b97..7f1b1e6 100644
--- a/tool/lib/commands/update_flutter_sdk.dart
+++ b/tool/lib/commands/update_flutter_sdk.dart
@@ -31,7 +31,7 @@
/// time since the GitHub workflow that updates this file runs twice per day.
///
/// To run this script:
-/// `devtools_tool update-flutter-sdk [--from-path] [--no-use-cache]`
+/// `dt update-flutter-sdk [--from-path] [--no-use-cache]`
class UpdateFlutterSdkCommand extends Command {
UpdateFlutterSdkCommand() {
argParser
diff --git a/tool/lib/devtools_command_runner.dart b/tool/lib/devtools_command_runner.dart
index 9d5caf4..10ba6d6 100644
--- a/tool/lib/devtools_command_runner.dart
+++ b/tool/lib/devtools_command_runner.dart
@@ -28,7 +28,7 @@
class DevToolsCommandRunner extends CommandRunner {
DevToolsCommandRunner()
- : super('devtools_tool', 'A repo management tool for DevTools.') {
+ : super('dt', 'A repo management tool for DevTools.') {
addCommand(AnalyzeCommand());
addCommand(BuildCommand());
addCommand(FixGoldensCommand());
@@ -52,7 +52,7 @@
abbr: 'p',
negatable: false,
help: 'Use the Flutter SDK on PATH for any `flutter`, `dart` and '
- '`devtools_tool` commands spawned by this process, instead of the '
+ '`dt` commands spawned by this process, instead of the '
'Flutter SDK from tool/flutter-sdk which is used by default.',
);
}
diff --git a/tool/lib/model.dart b/tool/lib/model.dart
index 2f9d6a0..89a2a00 100644
--- a/tool/lib/model.dart
+++ b/tool/lib/model.dart
@@ -38,7 +38,7 @@
final repoPath = _findRepoRoot(Directory.current);
if (repoPath == null) {
throw Exception(
- 'devtools_tool must be run from inside of the DevTools repository directory',
+ 'dt must be run from inside of the DevTools repository directory',
);
}
return DevToolsRepo._create(repoPath);
diff --git a/tool/lib/utils.dart b/tool/lib/utils.dart
index 0045807..fb68fe2 100644
--- a/tool/lib/utils.dart
+++ b/tool/lib/utils.dart
@@ -94,8 +94,8 @@
// Handling https://github.com/dart-lang/sdk/issues/54493
// Platform.script.toFilePath() duplicates next to current directory, when run recursively from itself.
toolPath = toolPath.replaceAll(
- 'devtools/tool/tool/bin/devtools_tool.dart',
- 'devtools/tool/bin/devtools_tool.dart',
+ 'devtools/tool/tool/bin/dt.dart',
+ 'devtools/tool/bin/dt.dart',
);
}
diff --git a/tool/pubspec.yaml b/tool/pubspec.yaml
index 6f96efc..f0ee57a 100644
--- a/tool/pubspec.yaml
+++ b/tool/pubspec.yaml
@@ -6,7 +6,7 @@
sdk: ^3.2.0
executables:
- devtools_tool: devtools_tool
+ dt: dt
dependencies:
args: ^2.4.2