]>
Commit | Line | Data |
---|---|---|
34bb443e AL |
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 | ||
9bd0bcc3 TH |
13 | if [ $# -ne 2 ]; then |
14 | echo "Usage:" | |
15 | echo " $0 gitrepo version" | |
16 | exit 0 | |
17 | fi | |
18 | ||
2019cabf | 19 | # Only include wraps that are invoked with subproject() |
f0df613b | 20 | SUBPROJECTS="libvfio-user keycodemapdb berkeley-softfloat-3 berkeley-testfloat-3" |
2019cabf | 21 | |
34bb443e AL |
22 | src="$1" |
23 | version="$2" | |
24 | destination=qemu-${version} | |
25 | ||
aa4609dc TH |
26 | git clone --single-branch -b "v${version}" -c advice.detachedHead=false \ |
27 | "${src}" ${destination} | |
28 | ||
34bb443e | 29 | pushd ${destination} |
aa4609dc TH |
30 | |
31 | git submodule update --init --single-branch | |
2019cabf PB |
32 | meson subprojects download $SUBPROJECTS |
33 | ||
8648fcd5 | 34 | (cd roms/seabios && git describe --tags --long --dirty > .version) |
3fccd3f2 | 35 | (cd roms/skiboot && ./make_version.sh > .version) |
45c61c6c MR |
36 | # Fetch edk2 submodule's submodules, since it won't have access to them via |
37 | # the tarball later. | |
38 | # | |
39 | # A more uniform way to handle this sort of situation would be nice, but we | |
40 | # don't necessarily have much control over how a submodule handles its | |
41 | # submodule dependencies, so we continue to handle these on a case-by-case | |
42 | # basis for now. | |
bd0da3a3 | 43 | (cd roms/edk2 && \ |
aa4609dc | 44 | git submodule update --init --depth 1 -- \ |
bd0da3a3 PMD |
45 | ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \ |
46 | BaseTools/Source/C/BrotliCompress/brotli \ | |
47 | CryptoPkg/Library/OpensslLib/openssl \ | |
48 | MdeModulePkg/Library/BrotliCustomDecompressLib/brotli) | |
34bb443e | 49 | popd |
9bc9e951 | 50 | tar --exclude=.git -cJf ${destination}.tar.xz ${destination} |
34bb443e | 51 | rm -rf ${destination} |