make-release 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash -e
  2. #
  3. # QEMU Release Script
  4. #
  5. # Copyright IBM, Corp. 2012
  6. #
  7. # Authors:
  8. # Anthony Liguori <aliguori@us.ibm.com>
  9. #
  10. # This work is licensed under the terms of the GNU GPLv2 or later.
  11. # See the COPYING file in the top-level directory.
  12. if [ $# -ne 2 ]; then
  13. echo "Usage:"
  14. echo " $0 gitrepo version"
  15. exit 0
  16. fi
  17. # Only include wraps that are invoked with subproject()
  18. SUBPROJECTS="dtc libvfio-user keycodemapdb berkeley-softfloat-3 berkeley-testfloat-3"
  19. src="$1"
  20. version="$2"
  21. destination=qemu-${version}
  22. git clone --single-branch -b "v${version}" -c advice.detachedHead=false \
  23. "${src}" ${destination}
  24. pushd ${destination}
  25. git submodule update --init --single-branch
  26. meson subprojects download $SUBPROJECTS
  27. (cd roms/seabios && git describe --tags --long --dirty > .version)
  28. (cd roms/skiboot && ./make_version.sh > .version)
  29. # Fetch edk2 submodule's submodules, since it won't have access to them via
  30. # the tarball later.
  31. #
  32. # A more uniform way to handle this sort of situation would be nice, but we
  33. # don't necessarily have much control over how a submodule handles its
  34. # submodule dependencies, so we continue to handle these on a case-by-case
  35. # basis for now.
  36. (cd roms/edk2 && \
  37. git submodule update --init --depth 1 -- \
  38. ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \
  39. BaseTools/Source/C/BrotliCompress/brotli \
  40. CryptoPkg/Library/OpensslLib/openssl \
  41. MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
  42. popd
  43. tar --exclude=.git -cjf ${destination}.tar.bz2 ${destination}
  44. rm -rf ${destination}