uprev_ebuilds 937 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. # Copyright 2021 The ChromiumOS Authors
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. #
  6. # Uprev ebuild files of crosvm (and related packages) to the currently checked
  7. # out commit.
  8. # This uses the same process that PUpr is using when generating uprev CLs.
  9. cd $(dirname $0)
  10. CHROMITE_DIR=../../../../../chromite
  11. if ! [ -e "${CHROMITE_DIR}" ]; then
  12. echo "Run from ChromeOS checkout."
  13. exit 1
  14. fi
  15. IN=$(mktemp)
  16. OUT=$(mktemp)
  17. echo '{
  18. "package_info": {
  19. "category": "chromeos-base",
  20. "package_name": "crosvm"
  21. },
  22. "versions": [
  23. {
  24. "repository": "dummy",
  25. "ref": "dummy",
  26. "revision": "dummy"
  27. }
  28. ]
  29. }' >> "${IN}"
  30. ${CHROMITE_DIR}/bin/build_api \
  31. --input-json "${IN}" \
  32. --output-json "${OUT}" \
  33. chromite.api.PackageService/UprevVersionedPackage
  34. cat "${OUT}"
  35. rm "${IN}"
  36. rm "${OUT}"