From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] build: add make dist target (v2)
Date: Tue, 17 Jul 2012 14:12:52 -0500 [thread overview]
Message-ID: <20120717191252.GC2880@illuin> (raw)
In-Reply-To: <1342550012-5697-1-git-send-email-aliguori@us.ibm.com>
On Tue, Jul 17, 2012 at 01:33:32PM -0500, Anthony Liguori wrote:
> Let's stop screwing up releases by having a script do the work that Anthony's
> fat fingers can't seem to get right.
>
> Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Breaks if there's no tag corresponding with the contents of VERSION,
but that might be considered a feature (an alternative might be to
assume it's a development release, use current HEAD for master, and append the
short git hash to the version). Works well as far as I can tell though,
and I made a special point to confirm it did indeed output a bz2 :)
Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
> v1 -> v2
> - include the scripts for real this time
> - remove tar/tarbin from PHONY
> ---
> Makefile | 19 ++++++++-----------
> scripts/make-release | 24 ++++++++++++++++++++++++
> 2 files changed, 32 insertions(+), 11 deletions(-)
> create mode 100755 scripts/make-release
>
> diff --git a/Makefile b/Makefile
> index 9707fa0..abf825d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -31,7 +31,7 @@ Makefile: ;
> configure: ;
>
> .PHONY: all clean cscope distclean dvi html info install install-doc \
> - pdf recurse-all speed tar tarbin test build-all
> + pdf recurse-all speed test build-all dist
>
> $(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
>
> @@ -232,6 +232,13 @@ clean:
> rm -f $$d/qemu-options.def; \
> done
>
> +VERSION ?= $(shell cat VERSION)
> +
> +dist: qemu-$(VERSION).tar.bz2
> +
> +qemu-%.tar.bz2:
> + $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
> +
> distclean: clean
> rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
> rm -f config-all-devices.mak
> @@ -390,15 +397,5 @@ qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
> qemu-img.texi qemu-nbd.texi qemu-options.texi \
> qemu-monitor.texi qemu-img-cmds.texi
>
> -VERSION ?= $(shell cat VERSION)
> -FILE = qemu-$(VERSION)
> -
> -# tar release (use 'make -k tar' on a checkouted tree)
> -tar:
> - rm -rf /tmp/$(FILE)
> - cp -r . /tmp/$(FILE)
> - cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
> - rm -rf /tmp/$(FILE)
> -
> # Include automatically generated dependency files
> -include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d)
> diff --git a/scripts/make-release b/scripts/make-release
> new file mode 100755
> index 0000000..196c755
> --- /dev/null
> +++ b/scripts/make-release
> @@ -0,0 +1,24 @@
> +#!/bin/bash -e
> +#
> +# QEMU Release Script
> +#
> +# Copyright IBM, Corp. 2012
> +#
> +# Authors:
> +# Anthony Liguori <aliguori@us.ibm.com>
> +#
> +# This work is licensed under the terms of the GNU GPLv2 or later.
> +# See the COPYING file in the top-level directory.
> +
> +src="$1"
> +version="$2"
> +destination=qemu-${version}
> +
> +git clone "${src}" ${destination}
> +pushd ${destination}
> +git checkout "v${version}"
> +git submodule update --init
> +rm -rf .git roms/*/.git
> +popd
> +tar cfj ${destination}.tar.bz2 ${destination}
> +rm -rf ${destination}
> --
> 1.7.5.4
>
next prev parent reply other threads:[~2012-07-17 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 18:33 [Qemu-devel] [PATCH] build: add make dist target (v2) Anthony Liguori
2012-07-17 18:50 ` Eric Blake
2012-07-17 19:12 ` Michael Roth [this message]
2012-07-18 13:40 ` Gerd Hoffmann
2012-07-18 13:55 ` Anthony Liguori
2012-07-18 14:07 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120717191252.GC2880@illuin \
--to=mdroth@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).