2021-12-06 19:49:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
set -e
|
|
|
|
|
2022-04-14 21:45:04 +00:00
|
|
|
# Python script to check for at least version 3.9
|
|
|
|
VERSION_CHECK="
|
|
|
|
import sys
|
|
|
|
sys.exit(sys.version_info.major != 3 or sys.version_info.minor < 9)
|
|
|
|
"
|
|
|
|
|
2021-12-06 19:49:32 +00:00
|
|
|
main() {
|
2022-01-12 01:29:31 +00:00
|
|
|
cd "${KOKORO_ARTIFACTS_DIR}/git/crosvm"
|
|
|
|
|
2022-04-12 18:15:20 +00:00
|
|
|
# Ensure we have at least python 3.9. Kokoro does not and requires us to use pyenv to install
|
|
|
|
# The required version.
|
2022-04-14 22:20:38 +00:00
|
|
|
if ! python3 -c "$VERSION_CHECK"; then
|
|
|
|
pyenv install --verbose --skip-existing 3.9.5
|
2022-04-12 18:15:20 +00:00
|
|
|
pyenv global 3.9.5
|
2022-01-11 22:25:27 +00:00
|
|
|
fi
|
|
|
|
|
2022-04-12 18:15:20 +00:00
|
|
|
# Extra packages required by merge_bot
|
|
|
|
if ! pip show argh; then
|
|
|
|
pip install argh
|
2022-01-11 22:25:27 +00:00
|
|
|
fi
|
2021-12-14 23:13:19 +00:00
|
|
|
|
2022-04-12 18:15:20 +00:00
|
|
|
./tools/chromeos/merge_bot -v update-merges --is-bot
|
|
|
|
./tools/chromeos/merge_bot -v update-dry-runs --is-bot
|
2021-12-06 19:49:32 +00:00
|
|
|
}
|
2022-01-26 19:00:13 +00:00
|
|
|
|
2021-12-06 19:49:32 +00:00
|
|
|
main
|