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

[Ovirt-devel] [PATCH] [ovirt-release] autobuild.sh



---
 autobuild.sh |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100755 autobuild.sh

diff --git a/autobuild.sh b/autobuild.sh
new file mode 100755
index 0000000..b8290a0
--- /dev/null
+++ b/autobuild.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#oVirt release autobuild script
+#
+# Copyright (C) 2008 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301, USA.  A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+echo "Running oVirt Release Autobuild"
+
+set -e
+set -v
+
+test -f Makefile && make -k distclean || :
+
+if [ -f /usr/bin/rpmbuild ]; then
+  if [ -n "$AUTOBUILD_COUNTER" ]; then
+    EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
+  else
+    NOW=`date +"%s"`
+    EXTRA_RELEASE=".$USER$NOW"
+  fi 
+  # manually copy files over until we have an autotools
+  #  generated tarball to base rpmbuild on
+  cp version $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/
+  cp ovirt.repo $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/
+  cp ovirt.mk $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/
+
+  rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ba --clean ovirt-release.spec
+fi
-- 
1.5.4.1


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