mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Add CIPD dependency for Dart DevTools
Pulls a pre-built DevTools into the SDK and provides an update script to pull DevTools, rebuild at a particular revision, and upload the new build to CIPD. Change-Id: Ice7a9b6bfeea333bc2769dadaeba6eb11fc033d6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187161 Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
085529d58d
commit
202db681cb
7
DEPS
7
DEPS
|
@ -229,6 +229,13 @@ deps = {
|
|||
}],
|
||||
"dep_type": "cipd",
|
||||
},
|
||||
Var("dart_root") + "/third_party/devtools": {
|
||||
"packages": [{
|
||||
"package": "dart/third_party/flutter/devtools",
|
||||
"version": "revision:6729ec62c3548839018c32fa711756202431ccf7",
|
||||
}],
|
||||
"dep_type": "cipd",
|
||||
},
|
||||
Var("dart_root") + "/tests/co19/src": {
|
||||
"packages": [{
|
||||
"package": "dart/third_party/co19",
|
||||
|
|
14
third_party/devtools/README
vendored
Normal file
14
third_party/devtools/README
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
This folder contains a pre-built Dart DevTools instance which can be served
|
||||
as a web application, as well as the package:devtools_server and package:devtools_shared
|
||||
from the same revision, used to host and launch DevTools from a Dart process.
|
||||
|
||||
First, ensure Flutter is installed and on your path (see https://flutter.dev/docs/get-started/install/linux#install-flutter-manually).
|
||||
|
||||
With `flutter` on your path, do the following:
|
||||
|
||||
- Run ./update.sh <revision> to build DevTools at a given revision and upload it
|
||||
to CIPD. The uploaded CIPD entry will be tagged with `revision:<revision>`
|
||||
- Update DEPS to point to the newly updated DevTools by providing "revision:<revision>"
|
||||
as the version entry for "third_party/devtools"
|
||||
|
||||
DevTools CIPD packages are located at https://chrome-infra-packages.appspot.com/p/dart/third_party/flutter/devtools/+/.
|
41
third_party/devtools/update.sh
vendored
Executable file
41
third_party/devtools/update.sh
vendored
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2021 The Dart Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
set -ex #echo on
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: update.sh revision"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
cleanup() {
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
trap cleanup EXIT HUP INT QUIT TERM PIPE
|
||||
cd "$tmpdir"
|
||||
|
||||
# Clone DevTools and build.
|
||||
git clone git@github.com:flutter/devtools.git
|
||||
cd devtools
|
||||
git checkout -b cipd_release $1
|
||||
|
||||
./tool/build_release.sh
|
||||
|
||||
# Copy the build output as well as the devtools packages needed
|
||||
# to serve from DDS.
|
||||
mkdir cipd_package
|
||||
cp -R packages/devtools/build/ cipd_package/web
|
||||
cp -r packages/devtools_server cipd_package
|
||||
cp -r packages/devtools_shared cipd_package
|
||||
|
||||
cipd create \
|
||||
-name dart/third_party/flutter/devtools \
|
||||
-in cipd_package \
|
||||
-install-mode copy \
|
||||
-tag revision:$1
|
||||
|
Loading…
Reference in a new issue