Re: [PATCH JAVA] Add an automated build control script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 11, 2011 at 12:25:32PM +0000, Daniel P. Berrange wrote:
> Add a control script to be used by the automated build
> system
> 
> * autobuild.sh: Automated build control file
> * libvirt-java.spec.in: Include %extra_release
> ---
>  autobuild.sh         |   31 +++++++++++++++++++++++++++++++
>  libvirt-java.spec.in |    2 +-
>  2 files changed, 32 insertions(+), 1 deletions(-)
>  create mode 100755 autobuild.sh
> 
> diff --git a/autobuild.sh b/autobuild.sh
> new file mode 100755
> index 0000000..cca4066
> --- /dev/null
> +++ b/autobuild.sh
> @@ -0,0 +1,31 @@
> +#!/bin/sh
> +
> +set -e
> +set -v
> +
> +test -n "$1" && RESULTS=$1 || RESULTS=results.log
> +
> +ant clean || :
> +
> +ant build docs
> +
> +ant test 2>&1 | tee $RESULTS
> +
> +rm -f *.tar.gz
> +ant src
> +
> +if [ -n "$AUTOBUILD_COUNTER" ]; then
> +  EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
> +else
> +  NOW=`date +"%s"`
> +  EXTRA_RELEASE=".$USER$NOW"
> +fi
> +
> +if [ -x /usr/bin/rpmbuild ]
> +then
> +  ant spec
> +  rpmbuild --nodeps \
> +     --define "extra_release $EXTRA_RELEASE" \
> +     --define "_sourcedir `pwd`/target" \
> +     -ba --clean target/libvirt-java.spec
> +fi
> diff --git a/libvirt-java.spec.in b/libvirt-java.spec.in
> index 1ded8a0..2c972b7 100644
> --- a/libvirt-java.spec.in
> +++ b/libvirt-java.spec.in
> @@ -2,7 +2,7 @@ Summary:    Java bindings for the libvirt virtualization API
>  Name:       libvirt-java
>  Version:    @version@
>  Prefix:     libvirt
> -Release:    @release@%{?dist}
> +Release:    @release@%{?dist}%{?extra_release}
>  License:    LGPLv2+
>  BuildArch:  noarch
>  Group:      Development/Libraries

  Looks fine to me !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]