File size: 1,131 Bytes
7d80aa8
 
 
 
 
 
 
 
 
 
 
 
 
e0a2378
 
 
 
 
 
 
 
 
 
 
7d80aa8
 
 
e0a2378
7d80aa8
 
 
e0a2378
7d80aa8
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io' show Platform;

import 'package:path/path.dart' as path;

import '../run_command.dart';
import '../utils.dart';

Future<void> customerTestingRunner() async {
  printProgress('${green}Running customer testing$reset');
  await runCommand('git', const <String>[
    'fetch',
    'origin',
    'master',
  ], workingDirectory: flutterRoot);
  await runCommand('git', const <String>[
    'branch',
    '-f',
    'master',
    'origin/master',
  ], workingDirectory: flutterRoot);
  final Map<String, String> env = Platform.environment;
  final String? revision = env['REVISION'];
  if (revision != null) {
    await runCommand('git', <String>['checkout', revision], workingDirectory: flutterRoot);
  }
  final String winScript = path.join(flutterRoot, 'dev', 'customer_testing', 'ci.bat');
  await runCommand(
    Platform.isWindows ? winScript : './ci.sh',
    <String>[],
    workingDirectory: path.join(flutterRoot, 'dev', 'customer_testing'),
  );
}