xref: /openbmc/qemu/scripts/make-release (revision bd0da3a3d4f5e51856b5716508df9a4fdbbd416c)
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
1334bb443eSAnthony Liguorisrc="$1"
1434bb443eSAnthony Liguoriversion="$2"
1534bb443eSAnthony Liguoridestination=qemu-${version}
1634bb443eSAnthony Liguori
1734bb443eSAnthony Liguorigit clone "${src}" ${destination}
1834bb443eSAnthony Liguoripushd ${destination}
1934bb443eSAnthony Liguorigit checkout "v${version}"
2034bb443eSAnthony Liguorigit submodule update --init
218648fcd5SAndreas Färber(cd roms/seabios && git describe --tags --long --dirty > .version)
223fccd3f2SMichael Roth(cd roms/skiboot && ./make_version.sh > .version)
2345c61c6cSMichael Roth# Fetch edk2 submodule's submodules, since it won't have access to them via
2445c61c6cSMichael Roth# the tarball later.
2545c61c6cSMichael Roth#
2645c61c6cSMichael Roth# A more uniform way to handle this sort of situation would be nice, but we
2745c61c6cSMichael Roth# don't necessarily have much control over how a submodule handles its
2845c61c6cSMichael Roth# submodule dependencies, so we continue to handle these on a case-by-case
2945c61c6cSMichael Roth# basis for now.
30*bd0da3a3SPhilippe Mathieu-Daudé(cd roms/edk2 && \
31*bd0da3a3SPhilippe Mathieu-Daudé    git submodule update --init -- \
32*bd0da3a3SPhilippe Mathieu-Daudé        ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 \
33*bd0da3a3SPhilippe Mathieu-Daudé        BaseTools/Source/C/BrotliCompress/brotli \
34*bd0da3a3SPhilippe Mathieu-Daudé        CryptoPkg/Library/OpensslLib/openssl \
35*bd0da3a3SPhilippe Mathieu-Daudé        MdeModulePkg/Library/BrotliCustomDecompressLib/brotli)
3634bb443eSAnthony Liguoripopd
37d0081e8fSCole Robinsontar --exclude=.git -cjf ${destination}.tar.bz2 ${destination}
3834bb443eSAnthony Liguorirm -rf ${destination}
39