|
16 | 16 | # Go to the engine git repo to get the date of the latest commit. |
17 | 17 | cd $ENGINE_PATH/src/flutter |
18 | 18 |
|
19 | | -# Special handling of release branches. |
20 | | -ENGINE_BRANCH_NAME=$CIRRUS_BASE_BRANCH |
21 | | -versionregex="^v[[:digit:]]+\." |
22 | | -releasecandidateregex="^flutter-[[:digit:]]+\.[[:digit:]]+-candidate\.[[:digit:]]+$" |
23 | | -ON_RELEASE_BRANCH=false |
| 19 | +# Special handling of release branches. We would like to run the tests against |
| 20 | +# the release branch of flutter. |
| 21 | +# |
| 22 | +# This is a shortcut for the release branch, since we didn't address this part |
| 23 | +# in LUCI yet. |
| 24 | +ENGINE_BRANCH_NAME="flutter-1.20-candidate.7" |
| 25 | + |
| 26 | +ON_RELEASE_BRANCH=true |
| 27 | +echo "release branch $ENGINE_BRANCH_NAME" |
24 | 28 | echo "Engine on branch $ENGINE_BRANCH_NAME" |
25 | | -if [[ $ENGINE_BRANCH_NAME =~ $versionregex || $ENGINE_BRANCH_NAME =~ $releasecandidateregex ]] |
26 | | -then |
27 | | - echo "release branch $ENGINE_BRANCH_NAME" |
28 | | - ON_RELEASE_BRANCH=true |
29 | | -fi |
30 | | - |
31 | | -# Get latest commit's time for the engine repo. |
32 | | -# Use date based on local time otherwise timezones might get mixed. |
33 | | -LATEST_COMMIT_TIME_ENGINE=`git log -1 --date=local --format="%cd"` |
34 | | -echo "Latest commit time on engine found as $LATEST_COMMIT_TIME_ENGINE" |
35 | 29 |
|
36 | 30 | # Check if there is an argument added for repo location. |
37 | 31 | # If not use the location that should be set by Cirrus/LUCI. |
|
53 | 47 | fi |
54 | 48 |
|
55 | 49 | # Clone the Flutter Framework. |
56 | | -git clone https://github.com/flutter/flutter.git |
| 50 | +git clone https://github.com/flutter/flutter.git -b "$ENGINE_BRANCH_NAME" |
57 | 51 | cd flutter |
58 | | - |
59 | | -FRAMEWORK_BRANCH_NAME=`git branch | grep '*' | cut -d ' ' -f2` |
60 | | -if [[ "$ON_RELEASE_BRANCH" = true && ENGINE_BRANCH_NAME != FRAMEWORK_BRANCH_NAME ]] |
61 | | -then |
62 | | - echo "For a release framework and engine should be on the same version." |
63 | | - echo "Switching branches on Framework to from $FRAMEWORK_BRANCH_NAME to $ENGINE_BRANCH_NAME" |
64 | | - # Switch to the same version branch with the engine. |
65 | | - # If same version branch does not exits, fail. |
66 | | - SWITCH_RESULT=`git checkout $ENGINE_BRANCH_NAME` || true |
67 | | - if [[ -z "$SWITCH_RESULT" ]] |
68 | | - then |
69 | | - echo "$ENGINE_BRANCH_NAME Branch not found on framework. Quit." |
70 | | - exit 1 |
71 | | - fi |
72 | | -fi |
73 | | - |
74 | | -# Get the time of the youngest commit older than engine commit. |
75 | | -# Git log uses commit date not the author date. |
76 | | -# Before makes the comparison considering the timezone as well. |
77 | | -COMMIT_NO=`git log --before="$LATEST_COMMIT_TIME_ENGINE" -n 1 | grep commit | cut -d ' ' -f2` |
78 | | -echo "Using the flutter/flutter commit $COMMIT_NO"; |
79 | | -git reset --hard $COMMIT_NO |
0 commit comments