From 71787e0884f1c9e3c088f779a70be904dc6610f6 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 13:29:40 -0700 Subject: [PATCH 1/9] setting an env variable using commit no --- tools/configure_framework_commit.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index 590f946974848..4cf96d9833486 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -31,5 +31,8 @@ COMMIT_NO=`git log --before="$LATEST_COMMIT_TIME_ENGINE" -n 1 | grep commit | cu echo "Using the flutter/flutter commit $COMMIT_NO"; git reset --hard $COMMIT_NO +# Set commit no to an env variable. +export REF_SHA=$COMMIT_NO + # Print out the flutter version for troubleshooting $FLUTTER_CLONE_REPO_PATH/bin/flutter --version From 329147d630f518bc8d9e0b34dc018312d1d6d636 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 13:54:41 -0700 Subject: [PATCH 2/9] change variable name --- tools/configure_framework_commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index 4cf96d9833486..01786a60a83fe 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -32,7 +32,7 @@ echo "Using the flutter/flutter commit $COMMIT_NO"; git reset --hard $COMMIT_NO # Set commit no to an env variable. -export REF_SHA=$COMMIT_NO +export FLUTTER_REF=$COMMIT_NO # Print out the flutter version for troubleshooting $FLUTTER_CLONE_REPO_PATH/bin/flutter --version From 87ceb5cec77c41cd5266cb4b9c7119c605c58be2 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 15:13:06 -0700 Subject: [PATCH 3/9] try to use ref no as string --- tools/configure_framework_commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index 01786a60a83fe..e300bcc19404a 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -32,7 +32,7 @@ echo "Using the flutter/flutter commit $COMMIT_NO"; git reset --hard $COMMIT_NO # Set commit no to an env variable. -export FLUTTER_REF=$COMMIT_NO +export FLUTTER_REF="$COMMIT_NO" # Print out the flutter version for troubleshooting $FLUTTER_CLONE_REPO_PATH/bin/flutter --version From e322f5f687c1804ff81feab375723391b2ef8d3a Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 17:37:08 -0700 Subject: [PATCH 4/9] use echo for output --- tools/configure_framework_commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index e300bcc19404a..5e598a40fb0b8 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -32,7 +32,7 @@ echo "Using the flutter/flutter commit $COMMIT_NO"; git reset --hard $COMMIT_NO # Set commit no to an env variable. -export FLUTTER_REF="$COMMIT_NO" +echo "$COMMIT_NO" # Print out the flutter version for troubleshooting $FLUTTER_CLONE_REPO_PATH/bin/flutter --version From 4f243aac416bd8d67cfb42f615446b61dc19eafd Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 18:26:00 -0700 Subject: [PATCH 5/9] remove all the other stdout --- tools/configure_framework_commit.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index 5e598a40fb0b8..31d439cdf8fcf 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -1,6 +1,5 @@ #!/bin/bash set -e -set -x if [[ -z $ENGINE_PATH ]] then @@ -14,7 +13,6 @@ cd $ENGINE_PATH/src/flutter # 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" if [[ -z $FLUTTER_CLONE_REPO_PATH ]] then @@ -28,11 +26,7 @@ fi # 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 # Set commit no to an env variable. echo "$COMMIT_NO" - -# Print out the flutter version for troubleshooting -$FLUTTER_CLONE_REPO_PATH/bin/flutter --version From a6ef4c096df8a6e87407585dcabf222ad4d565ff Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 18:42:19 -0700 Subject: [PATCH 6/9] echo json instead of only the commit no --- tools/configure_framework_commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index 31d439cdf8fcf..779c909c260e9 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -29,4 +29,4 @@ COMMIT_NO=`git log --before="$LATEST_COMMIT_TIME_ENGINE" -n 1 | grep commit | cu git reset --hard $COMMIT_NO # Set commit no to an env variable. -echo "$COMMIT_NO" +echo '{ "FLUTTER_REF" : ' $COMMIT_NO '} ' From 3afd52e7a52250198a8f99df770e6a37d28c223f Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 18:56:32 -0700 Subject: [PATCH 7/9] use the file method --- tools/configure_framework_commit.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index 779c909c260e9..fbfb7bcfa4d3e 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -1,5 +1,6 @@ #!/bin/bash set -e +set -x if [[ -z $ENGINE_PATH ]] then @@ -13,6 +14,7 @@ cd $ENGINE_PATH/src/flutter # 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" if [[ -z $FLUTTER_CLONE_REPO_PATH ]] then @@ -26,7 +28,11 @@ fi # 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 -# Set commit no to an env variable. -echo '{ "FLUTTER_REF" : ' $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 From 00edd10b11b93851e19de2c80011accb1d3bdabb Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 20:09:45 -0700 Subject: [PATCH 8/9] list the directory contents --- tools/configure_framework_commit.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index fbfb7bcfa4d3e..ba8377a2a8d28 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -34,5 +34,8 @@ 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 +pwd +ls -a + # Print out the flutter version for troubleshooting $FLUTTER_CLONE_REPO_PATH/bin/flutter --version From c9c29ce72d9b8b23356af1f859789b126506deae Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 1 Oct 2020 20:43:05 -0700 Subject: [PATCH 9/9] remove pwd. print flutter version verbose --- tools/configure_framework_commit.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/configure_framework_commit.sh b/tools/configure_framework_commit.sh index ba8377a2a8d28..2736dce390472 100755 --- a/tools/configure_framework_commit.sh +++ b/tools/configure_framework_commit.sh @@ -34,8 +34,5 @@ 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 -pwd -ls -a - # Print out the flutter version for troubleshooting -$FLUTTER_CLONE_REPO_PATH/bin/flutter --version +$FLUTTER_CLONE_REPO_PATH/bin/flutter --version -v