Anthony Liguori | 34bb443 | 2012-07-17 13:33:32 -0500 | [diff] [blame] | 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 | |
Thomas Huth | 9bd0bcc | 2022-11-28 10:25:51 +0100 | [diff] [blame] | 13 | if [ $# -ne 2 ]; then |
| 14 | echo "Usage:" |
| 15 | echo " $0 gitrepo version" |
| 16 | exit 0 |
| 17 | fi |
| 18 | |
Paolo Bonzini | 2019cab | 2023-05-18 16:50:00 +0200 | [diff] [blame] | 19 | # Only include wraps that are invoked with subproject() |
Manos Pitsidianakis | 2b74dd9 | 2024-10-03 16:28:50 +0300 | [diff] [blame] | 20 | SUBPROJECTS="libvfio-user keycodemapdb berkeley-softfloat-3 |
Paolo Bonzini | d0f0cd5 | 2024-10-10 16:11:28 +0200 | [diff] [blame] | 21 | berkeley-testfloat-3 arbitrary-int-1-rs bilge-0.2-rs |
| 22 | bilge-impl-0.2-rs either-1-rs itertools-0.11-rs proc-macro2-1-rs |
| 23 | proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs |
Manos Pitsidianakis | 2b74dd9 | 2024-10-03 16:28:50 +0300 | [diff] [blame] | 24 | syn-2-rs unicode-ident-1-rs" |
Paolo Bonzini | 2019cab | 2023-05-18 16:50:00 +0200 | [diff] [blame] | 25 | |
Anthony Liguori | 34bb443 | 2012-07-17 13:33:32 -0500 | [diff] [blame] | 26 | src="$1" |
| 27 | version="$2" |
| 28 | destination=qemu-${version} |
| 29 | |
Thomas Huth | aa4609d | 2022-11-28 10:25:52 +0100 | [diff] [blame] | 30 | git clone --single-branch -b "v${version}" -c advice.detachedHead=false \ |
| 31 | "${src}" ${destination} |
| 32 | |
Anthony Liguori | 34bb443 | 2012-07-17 13:33:32 -0500 | [diff] [blame] | 33 | pushd ${destination} |
Thomas Huth | aa4609d | 2022-11-28 10:25:52 +0100 | [diff] [blame] | 34 | |
| 35 | git submodule update --init --single-branch |
Paolo Bonzini | 2019cab | 2023-05-18 16:50:00 +0200 | [diff] [blame] | 36 | meson subprojects download $SUBPROJECTS |
| 37 | |
Andreas Färber | 8648fcd | 2014-03-20 02:01:55 +0100 | [diff] [blame] | 38 | (cd roms/seabios && git describe --tags --long --dirty > .version) |
Michael Roth | 3fccd3f | 2018-11-09 10:13:52 -0600 | [diff] [blame] | 39 | (cd roms/skiboot && ./make_version.sh > .version) |
Michael Roth | 45c61c6 | 2019-09-12 18:12:01 -0500 | [diff] [blame] | 40 | # Fetch edk2 submodule's submodules, since it won't have access to them via |
| 41 | # the tarball later. |
| 42 | # |
| 43 | # A more uniform way to handle this sort of situation would be nice, but we |
| 44 | # don't necessarily have much control over how a submodule handles its |
| 45 | # submodule dependencies, so we continue to handle these on a case-by-case |
| 46 | # basis for now. |
Philippe Mathieu-Daudé | bd0da3a | 2021-10-18 12:58:16 +0200 | [diff] [blame] | 47 | (cd roms/edk2 && \ |
Thomas Huth | aa4609d | 2022-11-28 10:25:52 +0100 | [diff] [blame] | 48 | git submodule update --init --depth 1 -- \ |
Philippe Mathieu-Daudé | bd0da3a | 2021-10-18 12:58:16 +0200 | [diff] [blame] | 49 | ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \ |
| 50 | BaseTools/Source/C/BrotliCompress/brotli \ |
| 51 | CryptoPkg/Library/OpensslLib/openssl \ |
| 52 | MdeModulePkg/Library/BrotliCustomDecompressLib/brotli) |
Anthony Liguori | 34bb443 | 2012-07-17 13:33:32 -0500 | [diff] [blame] | 53 | popd |
Michael Tokarev | 9bc9e95 | 2024-03-04 21:46:39 +0300 | [diff] [blame] | 54 | tar --exclude=.git -cJf ${destination}.tar.xz ${destination} |
Anthony Liguori | 34bb443 | 2012-07-17 13:33:32 -0500 | [diff] [blame] | 55 | rm -rf ${destination} |