mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
Add uprev_ebuilds script
This script allows us to generate manual uprev CLs the same way PUpr creates them. BUG=b:204223210 TEST=./tools/chromeos/uprev_ebuilds Change-Id: I45f9f0f4d33f8782637455b578688fa9b504fe8e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3248905 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
df7d744fec
commit
6fdbcacce7
1 changed files with 43 additions and 0 deletions
43
tools/chromeos/uprev_ebuilds
Executable file
43
tools/chromeos/uprev_ebuilds
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
# 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.
|
||||
#
|
||||
# Uprev ebuild files of crosvm (and related packages) to the currently checked
|
||||
# out commit.
|
||||
# This uses the same process that PUpr is using when generating uprev CLs.
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
CHROMITE_DIR=../../../../../chromite
|
||||
if ! [ -e "${CHROMITE_DIR}" ]; then
|
||||
echo "Run from ChromeOS checkout."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IN=$(mktemp)
|
||||
OUT=$(mktemp)
|
||||
|
||||
echo '{
|
||||
"package_info": {
|
||||
"category": "chromeos-base",
|
||||
"package_name": "crosvm"
|
||||
},
|
||||
"versions": [
|
||||
{
|
||||
"repository": "dummy",
|
||||
"ref": "dummy",
|
||||
"revision": "dummy"
|
||||
}
|
||||
]
|
||||
}' >> "${IN}"
|
||||
|
||||
${CHROMITE_DIR}/bin/build_api \
|
||||
--input-json "${IN}" \
|
||||
--output-json "${OUT}" \
|
||||
chromite.api.PackageService/UprevVersionedPackage
|
||||
|
||||
cat "${OUT}"
|
||||
|
||||
rm "${IN}"
|
||||
rm "${OUT}"
|
Loading…
Reference in a new issue