diff --git a/engine/src/flutter/tools/clone_flutter.sh b/engine/src/flutter/tools/clone_flutter.sh deleted file mode 100755 index b150a67aced..00000000000 --- a/engine/src/flutter/tools/clone_flutter.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -set -e -set -x - -if [[ "$CIRRUS_CI" = false || -z $CIRRUS_CI ]] -then - echo "Cloning Flutter repo to local machine." -fi - -if [[ -z $ENGINE_PATH ]] -then - echo "Please set ENGINE_PATH environment variable." - exit 1 -fi - -# Go to the engine git repo to get the date of the latest commit. -cd $ENGINE_PATH/src/flutter - -# Special handling of release branches. -ENGINE_BRANCH_NAME=$CIRRUS_BASE_BRANCH -versionregex="^v[[:digit:]]+\." -releasecandidateregex="^flutter-[[:digit:]]+\.[[:digit:]]+-candidate\.[[:digit:]]+$" -ON_RELEASE_BRANCH=false -echo "Engine on branch $ENGINE_BRANCH_NAME" -if [[ $ENGINE_BRANCH_NAME =~ $versionregex || $ENGINE_BRANCH_NAME =~ $releasecandidateregex ]] -then - echo "release branch $ENGINE_BRANCH_NAME" - ON_RELEASE_BRANCH=true -fi - -# Get latest commit's time for the engine repo. -# Use date based on local time otherwise timezones might get mixed. -LATEST_COMMIT_TIME_ENGINE=`git log -1 --date=local --format="%cd"` -echo "Latest commit time on engine found as $LATEST_COMMIT_TIME_ENGINE" - -# Check if there is an argument added for repo location. -# If not use the location that should be set by Cirrus/LUCI. -FLUTTER_CLONE_REPO_PATH=$1 - -if [[ -z $FLUTTER_CLONE_REPO_PATH ]] -then - if [[ -z $FRAMEWORK_PATH ]] - then - echo "Framework path should be set to run the script." - exit 1 - fi - # Do rest of the task in the root directory - cd ~ - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH -else - cd $FLUTTER_CLONE_REPO_PATH -fi - -# Clone the Flutter Framework. -git clone https://github.com/flutter/flutter.git -cd flutter - -FRAMEWORK_BRANCH_NAME=`git branch | grep '*' | cut -d ' ' -f2` -if [[ "$ON_RELEASE_BRANCH" = true && ENGINE_BRANCH_NAME != FRAMEWORK_BRANCH_NAME ]] -then - echo "For a release framework and engine should be on the same version." - echo "Switching branches on Framework to from $FRAMEWORK_BRANCH_NAME to $ENGINE_BRANCH_NAME" - # Switch to the same version branch with the engine. - # If same version branch does not exits, fail. - SWITCH_RESULT=`git checkout $ENGINE_BRANCH_NAME` || true - if [[ -z "$SWITCH_RESULT" ]] - then - echo "$ENGINE_BRANCH_NAME Branch not found on framework. Quit." - exit 1 - fi -fi - -# Get the time of the youngest commit older than engine commit. -# Git log uses commit date not the author date. -# Before makes the comparison considering the timezone as well. -COMMIT_NO=`git log --before="$LATEST_COMMIT_TIME_ENGINE" -n 1 | grep commit | cut -d ' ' -f2` -echo "Using the flutter/flutter commit $COMMIT_NO"; -git reset --hard $COMMIT_NO diff --git a/engine/src/flutter/tools/configure_framework_commit.sh b/engine/src/flutter/tools/configure_framework_commit.sh deleted file mode 100755 index b91b1933a03..00000000000 --- a/engine/src/flutter/tools/configure_framework_commit.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -set -e -set -x - -if [[ -z $ENGINE_PATH ]] -then - echo "Please set ENGINE_PATH environment variable." - exit 1 -fi - - -# Go to the engine git repo to get the date of the latest commit. -cd $ENGINE_PATH/src/flutter - -ENGINE_COMMIT=`git rev-parse HEAD` -echo "Using engine commit: $ENGINE_COMMIT" - -if [[ -z $FLUTTER_CLONE_REPO_PATH ]] -then - echo "Please set FLUTTER_CLONE_REPO_PATH environment variable." - exit 1 -else - cd $FLUTTER_CLONE_REPO_PATH -fi - -if [[ $GIT_BRANCH =~ ^flutter-.*-candidate.*$ ]] -then - # Coming from presubmit and assuming the correct branch has been already checked out. - COMMIT_NO=`git rev-parse HEAD` -else - # Try to get release branch from the checkout. - RELEASE_BRANCH=`git branch -a --contains $ENGINE_COMMIT | grep 'flutter-.*-candidate.*' || true` - if [[ -z $RELEASE_BRANCH ]] - then - # If this is not a release branch commit get latest commit's time for the engine repo. - # Use date based on local time otherwise timezones might get mixed. - LATEST_COMMIT_TIME_ENGINE=`git log -1 --date=local --format="%cd"` - echo "Latest commit time on engine found as $LATEST_COMMIT_TIME_ENGINE" - - # Get the time of the youngest commit older than engine commit. - # Git log uses commit date not the author date. - # Before makes the comparison considering the timezone as well. - COMMIT_NO=`git log --before="$LATEST_COMMIT_TIME_ENGINE" -n 1 | grep commit | cut -d ' ' -f2` - else - COMMIT_NO=`git rev-parse $RELEASE_BRANCH` - git checkout $RELEASE_BRANCH - fi -fi - -echo "Using the flutter/flutter commit $COMMIT_NO"; -git reset --hard $COMMIT_NO -# Write the commit number to a file. This file will be read by the LUCI recipe. -echo "$COMMIT_NO" >> flutter_ref.txt - -# Print out the flutter version for troubleshooting -$FLUTTER_CLONE_REPO_PATH/bin/flutter --version -v