forked from flutter/flutter-intellij
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub.sh
executable file
·83 lines (60 loc) · 2.17 KB
/
github.sh
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# 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.
# Fast fail the script on failures.
set -e
# Log Java information that can be used whenever Java needs to be updated
echo "ls /usr/lib/jvm"
ls /usr/lib/jvm
echo "System Java version:"
java --version
echo "export JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-amd64"
export JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-amd64
echo "ls $JAVA_HOME"
ls $JAVA_HOME
# Path is not used by the build, only by java --version
echo "export PATH=$JAVA_HOME/bin:\$PATH"
export PATH=$JAVA_HOME/bin:$PATH
# Clone and configure Flutter to the latest stable release
git clone --depth 1 https://github.com/flutter/flutter.git ../flutter
export PATH="$PATH":`pwd`/../flutter/bin:`pwd`/../flutter/bin/cache/dart-sdk/bin
flutter config --no-analytics
flutter doctor
export FLUTTER_SDK=`pwd`/../flutter
echo "IDEA_VERSION=$IDEA_VERSION"
echo "java --version"
java --version
# Get packages for the top-level grind script utilities.
echo "pub get `pwd`"
dart pub get
# Get packages for the test data.
(cd flutter-idea/testData/sample_tests; echo "dart pub get `pwd`"; dart pub get)
# Set up the plugin tool.
(cd tool/plugin; echo "dart pub get `pwd`"; dart pub get)
if [ "DART_BOT" = "$BOT" ] ; then
# Analyze the Dart code in the repo.
echo "dart analyze"
(cd flutter-idea/src; dart analyze)
(cd tool/plugin; dart analyze)
# Ensure that the edits have been applied to template files (and their target
# files have been regenerated).
./bin/plugin generate
# Show any changed files.
git status --porcelain
# Return a failure exit code if there are any diffs.
git diff --exit-code
# Run the tests for the plugin tool.
(cd tool/plugin; dart test/plugin_test.dart)
elif [ "CHECK_BOT" = "$BOT" ] ; then
# Run some validations on the repo code.
./bin/plugin lint
# Check plugin-referenced urls for liveness.
dart tool/grind.dart check-urls
elif [ "UNIT_TEST_BOT" = "$BOT" ] ; then
# Run unit tests.
./bin/plugin test --no-setup
else
# Run the build.
./bin/plugin make --channel=stable --only-version=$IDEA_VERSION --no-setup
fi