make-release 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. src="$1"
  18. version="$2"
  19. destination=qemu-${version}
  20. git clone --single-branch -b "v${version}" -c advice.detachedHead=false \
  21. "${src}" ${destination}
  22. pushd ${destination}
  23. git submodule update --init --single-branch
  24. (cd roms/seabios && git describe --tags --long --dirty > .version)
  25. (cd roms/skiboot && ./make_version.sh > .version)
  26. # Fetch edk2 submodule's submodules, since it won't have access to them via
  27. # the tarball later.
  28. #
  29. # A more uniform way to handle this sort of situation would be nice, but we
  30. # don't necessarily have much control over how a submodule handles its
  31. # submodule dependencies, so we continue to handle these on a case-by-case
  32. # basis for now.
  33. (cd roms/edk2 && \
  34. git submodule update --init --depth 1 -- \
  35. ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \
  36. BaseTools/Source/C/BrotliCompress/brotli \
  37. CryptoPkg/Library/OpensslLib/openssl \
  38. MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
  39. popd
  40. tar --exclude=.git -cjf ${destination}.tar.bz2 ${destination}
  41. rm -rf ${destination}