134bb443eSAnthony Liguori#!/bin/bash -e 234bb443eSAnthony Liguori# 334bb443eSAnthony Liguori# QEMU Release Script 434bb443eSAnthony Liguori# 534bb443eSAnthony Liguori# Copyright IBM, Corp. 2012 634bb443eSAnthony Liguori# 734bb443eSAnthony Liguori# Authors: 834bb443eSAnthony Liguori# Anthony Liguori <aliguori@us.ibm.com> 934bb443eSAnthony Liguori# 1034bb443eSAnthony Liguori# This work is licensed under the terms of the GNU GPLv2 or later. 1134bb443eSAnthony Liguori# See the COPYING file in the top-level directory. 1234bb443eSAnthony Liguori 139bd0bcc3SThomas Huthif [ $# -ne 2 ]; then 149bd0bcc3SThomas Huth echo "Usage:" 159bd0bcc3SThomas Huth echo " $0 gitrepo version" 169bd0bcc3SThomas Huth exit 0 179bd0bcc3SThomas Huthfi 189bd0bcc3SThomas Huth 192019cabfSPaolo Bonzini# Only include wraps that are invoked with subproject() 202b74dd91SManos PitsidianakisSUBPROJECTS="libvfio-user keycodemapdb berkeley-softfloat-3 21*d0f0cd5bSPaolo Bonzini berkeley-testfloat-3 arbitrary-int-1-rs bilge-0.2-rs 22*d0f0cd5bSPaolo Bonzini bilge-impl-0.2-rs either-1-rs itertools-0.11-rs proc-macro2-1-rs 23*d0f0cd5bSPaolo Bonzini proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs 242b74dd91SManos Pitsidianakis syn-2-rs unicode-ident-1-rs" 252019cabfSPaolo Bonzini 2634bb443eSAnthony Liguorisrc="$1" 2734bb443eSAnthony Liguoriversion="$2" 2834bb443eSAnthony Liguoridestination=qemu-${version} 2934bb443eSAnthony Liguori 30aa4609dcSThomas Huthgit clone --single-branch -b "v${version}" -c advice.detachedHead=false \ 31aa4609dcSThomas Huth "${src}" ${destination} 32aa4609dcSThomas Huth 3334bb443eSAnthony Liguoripushd ${destination} 34aa4609dcSThomas Huth 35aa4609dcSThomas Huthgit submodule update --init --single-branch 362019cabfSPaolo Bonzinimeson subprojects download $SUBPROJECTS 372019cabfSPaolo Bonzini 388648fcd5SAndreas Färber(cd roms/seabios && git describe --tags --long --dirty > .version) 393fccd3f2SMichael Roth(cd roms/skiboot && ./make_version.sh > .version) 4045c61c6cSMichael Roth# Fetch edk2 submodule's submodules, since it won't have access to them via 4145c61c6cSMichael Roth# the tarball later. 4245c61c6cSMichael Roth# 4345c61c6cSMichael Roth# A more uniform way to handle this sort of situation would be nice, but we 4445c61c6cSMichael Roth# don't necessarily have much control over how a submodule handles its 4545c61c6cSMichael Roth# submodule dependencies, so we continue to handle these on a case-by-case 4645c61c6cSMichael Roth# basis for now. 47bd0da3a3SPhilippe Mathieu-Daudé(cd roms/edk2 && \ 48aa4609dcSThomas Huth git submodule update --init --depth 1 -- \ 49bd0da3a3SPhilippe Mathieu-Daudé ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \ 50bd0da3a3SPhilippe Mathieu-Daudé BaseTools/Source/C/BrotliCompress/brotli \ 51bd0da3a3SPhilippe Mathieu-Daudé CryptoPkg/Library/OpensslLib/openssl \ 52bd0da3a3SPhilippe Mathieu-Daudé MdeModulePkg/Library/BrotliCustomDecompressLib/brotli) 5334bb443eSAnthony Liguoripopd 549bc9e951SMichael Tokarevtar --exclude=.git -cJf ${destination}.tar.xz ${destination} 5534bb443eSAnthony Liguorirm -rf ${destination} 56