blob: cf7d694ef73ba1c6c5afad5d211a42f6a6fe1577 [file] [log] [blame]
Anthony Liguori34bb4432012-07-17 13:33:32 -05001#!/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
Thomas Huth9bd0bcc2022-11-28 10:25:51 +010013if [ $# -ne 2 ]; then
14 echo "Usage:"
15 echo " $0 gitrepo version"
16 exit 0
17fi
18
Paolo Bonzini2019cab2023-05-18 16:50:00 +020019# Only include wraps that are invoked with subproject()
Manos Pitsidianakis2b74dd92024-10-03 16:28:50 +030020SUBPROJECTS="libvfio-user keycodemapdb berkeley-softfloat-3
21 berkeley-testfloat-3 proc-macro2-1-rs quote-1-rs
22 syn-2-rs unicode-ident-1-rs"
Paolo Bonzini2019cab2023-05-18 16:50:00 +020023
Anthony Liguori34bb4432012-07-17 13:33:32 -050024src="$1"
25version="$2"
26destination=qemu-${version}
27
Thomas Huthaa4609d2022-11-28 10:25:52 +010028git clone --single-branch -b "v${version}" -c advice.detachedHead=false \
29 "${src}" ${destination}
30
Anthony Liguori34bb4432012-07-17 13:33:32 -050031pushd ${destination}
Thomas Huthaa4609d2022-11-28 10:25:52 +010032
33git submodule update --init --single-branch
Paolo Bonzini2019cab2023-05-18 16:50:00 +020034meson subprojects download $SUBPROJECTS
35
Andreas Färber8648fcd2014-03-20 02:01:55 +010036(cd roms/seabios && git describe --tags --long --dirty > .version)
Michael Roth3fccd3f2018-11-09 10:13:52 -060037(cd roms/skiboot && ./make_version.sh > .version)
Michael Roth45c61c62019-09-12 18:12:01 -050038# Fetch edk2 submodule's submodules, since it won't have access to them via
39# the tarball later.
40#
41# A more uniform way to handle this sort of situation would be nice, but we
42# don't necessarily have much control over how a submodule handles its
43# submodule dependencies, so we continue to handle these on a case-by-case
44# basis for now.
Philippe Mathieu-Daudébd0da3a2021-10-18 12:58:16 +020045(cd roms/edk2 && \
Thomas Huthaa4609d2022-11-28 10:25:52 +010046 git submodule update --init --depth 1 -- \
Philippe Mathieu-Daudébd0da3a2021-10-18 12:58:16 +020047 ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \
48 BaseTools/Source/C/BrotliCompress/brotli \
49 CryptoPkg/Library/OpensslLib/openssl \
50 MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
Anthony Liguori34bb4432012-07-17 13:33:32 -050051popd
Michael Tokarev9bc9e952024-03-04 21:46:39 +030052tar --exclude=.git -cJf ${destination}.tar.xz ${destination}
Anthony Liguori34bb4432012-07-17 13:33:32 -050053rm -rf ${destination}