xref: /openbmc/qemu/scripts/make-release (revision 45c61c6c23918e3b05ed9ecac5b2328ebae5f774)
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)
23*45c61c6cSMichael Roth# Fetch edk2 submodule's submodules, since it won't have access to them via
24*45c61c6cSMichael Roth# the tarball later.
25*45c61c6cSMichael Roth#
26*45c61c6cSMichael Roth# A more uniform way to handle this sort of situation would be nice, but we
27*45c61c6cSMichael Roth# don't necessarily have much control over how a submodule handles its
28*45c61c6cSMichael Roth# submodule dependencies, so we continue to handle these on a case-by-case
29*45c61c6cSMichael Roth# basis for now.
30*45c61c6cSMichael Roth(cd roms/edk2 && git submodule update --init)
3134bb443eSAnthony Liguoripopd
32d0081e8fSCole Robinsontar --exclude=.git -cjf ${destination}.tar.bz2 ${destination}
3334bb443eSAnthony Liguorirm -rf ${destination}
34