mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
At the moment, making a release tarball is an annoyingly manual process that involves running "git archive" into a temporary directory. Script this process up and make a target, so that the release manager can simply type "make src-tarball-release" and have everything show up nice and neat in dist/xen-$version.tar.gz. "make src-tarball" will make a version number based on git describe, which will typically have the most recent tag, number of commits since that tag, and the git commit id of the current HEAD. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
39 lines
853 B
Bash
Executable File
39 lines
853 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# mktarball: Make a release tarball (including xen, qemu, and qemu-traditional)
|
|
#
|
|
# Takes 2 arguments, the path to the dist directory and the version
|
|
set -ex
|
|
|
|
function git_archive_into {
|
|
mkdir "$2"
|
|
|
|
git --git-dir="$1"/.git \
|
|
archive --format=tar HEAD | \
|
|
tar Cxf "$2" -
|
|
}
|
|
|
|
if [[ -z "$1" || -z "$2" ]] ; then
|
|
echo "usage: $0 path-to-XEN_ROOT xen-version"
|
|
exit 1
|
|
fi
|
|
|
|
xen_root="$1"
|
|
desc="$2"
|
|
|
|
tdir="$xen_root/dist/tmp.src-tarball"
|
|
|
|
rm -rf $tdir
|
|
|
|
mkdir -p $tdir
|
|
|
|
git_archive_into $xen_root $tdir/xen-$desc
|
|
|
|
git_archive_into $xen_root/tools/qemu-xen-dir-remote $tdir/xen-$desc/tools/qemu-xen
|
|
|
|
git_archive_into $xen_root/tools/qemu-xen-traditional-dir-remote $tdir/xen-$desc/tools/qemu-xen-traditional
|
|
|
|
GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc
|
|
|
|
echo "Source tarball in $xen_root/dist/xen-$desc.tar.gz"
|