aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Nikitin <denik@google.com>2021-10-01 10:07:39 -0700
committerCommit Bot <commit-bot@chromium.org>2021-10-01 18:39:30 +0000
commit6910c87fa3317ba0d96375b87c6d99f735fbfb7f (patch)
tree47522fe5921e55bb0f8f1ff6c43d6f1e809c4028
parent511e10da091a777f16ddcacedadb55fee27002ad (diff)
downloadtoolchain-utils-6910c87fa3317ba0d96375b87c6d99f735fbfb7f.tar.gz
update_kernel_afdo: Skip 95 branch
Add a list of skipped chromium branches and adjust canary branch number calculation. BUG=None TEST=`./update_kernel_afdo` shows 96 as canary. Change-Id: If96711f5a0d52c128d4829e338b9b950001c6e75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3199488 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Denis Nikitin <denik@chromium.org>
-rwxr-xr-xafdo_tools/update_kernel_afdo10
1 files changed, 9 insertions, 1 deletions
diff --git a/afdo_tools/update_kernel_afdo b/afdo_tools/update_kernel_afdo
index f539ee9d..ff0ab224 100755
--- a/afdo_tools/update_kernel_afdo
+++ b/afdo_tools/update_kernel_afdo
@@ -27,6 +27,8 @@ set -o pipefail
GS_BASE=gs://chromeos-prebuilt/afdo-job/vetted/kernel
KVERS="4.4 4.14 4.19 5.4"
failed_channels=""
+# Add skipped chrome branches in ascending order here.
+SKIPPED_BRANCHES="95"
script_dir=$(dirname "$0")
tc_utils_dir="${script_dir}/.."
@@ -57,8 +59,14 @@ branch["canary"]=${canary_ref##*/}
# Get current branch numbers (number which goes after R).
branch_number["stable"]=$(echo "${branch["stable"]}" | \
sed -n -e "s/^release-R\([0-9][0-9]*\).*$/\1/p")
-branch_number["beta"]="$((branch_number[stable] + 1))"
+branch_number["beta"]=$(echo "${branch["beta"]}" | \
+ sed -n -e "s/^release-R\([0-9][0-9]*\).*$/\1/p")
branch_number["canary"]="$((branch_number[beta] + 1))"
+for skipped_branch in $SKIPPED_BRANCHES ; do
+ if [[ ${branch_number["canary"]} == $skipped_branch ]] ; then
+ ((branch_number[canary]++))
+ fi
+done
# Without arguments the script updates all branches.
channels=${1:-"all"}