blob: 9419047471788aa8bc8742770f32c093cd2d0e0b [file] [log] [blame]
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine.recipe_api import Property
DEPS = [
# This recipe builds the device_doctor CIPD package.
def RunSteps(api):
cocoon_dir = api.path['start_dir'].join('cocoon')
cocoon_git_rev = api.repo_util.checkout(
cocoon_dir,'git_url'),'git_ref') or 'refs/heads/main',
# Builds and uploads a new version of the device_doctor CIPD package.
device_doctor_path = cocoon_dir.join('device_doctor')
with api.context(cwd=device_doctor_path):
if api.platform.is_linux or api.platform.is_mac:
build_file = device_doctor_path.join('tool', '')
api.step('build package', cmd=['bash', build_file])
build_file = device_doctor_path.join('tool', 'build.bat')
api.step('build package', cmd=[build_file])
cipd_package_name = 'flutter/device_doctor/${platform}'
cipd_zip_path = ''
device_doctor_path.join('build'), cipd_zip_path, cipd_package_name)
api.cipd.register(cipd_package_name, cipd_zip_path)
def GenTests(api):
for platform in ('mac', 'linux', 'win'):
yield api.test(
git_ref='refs/pull/123/head', git_url=''),
api.platform(platform, 64)