[PATCH ruby-libvirt] Add a control file for automated builds

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

 



* autobuild.sh: Automated build control
* ruby-libvirt.spec: Add autobuild release tag
---
 autobuild.sh      |   29 +++++++++++++++++++++++++++++
 ruby-libvirt.spec |    2 +-
 2 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100755 autobuild.sh

diff --git a/autobuild.sh b/autobuild.sh
new file mode 100755
index 0000000..216264e
--- /dev/null
+++ b/autobuild.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -v
+
+rake clean || :
+
+rake build
+#rake test
+
+rm -rf pkg
+rake package
+
+if [ -n "$AUTOBUILD_COUNTER" ]; then
+  EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
+else
+  NOW=`date +"%s"`
+  EXTRA_RELEASE=".$USER$NOW"
+fi
+
+if [ -f /usr/bin/rpmbuild ]; then
+  ver=`grep '^PKG_VERSION' Rakefile | sed -e "s/PKG_VERSION=//" -e "s/'//g"`
+  sed -e "s/\@VERSION\@/$ver/" < ruby-libvirt.spec > pkg/ruby-libvirt.spec
+  rpmbuild --nodeps \
+     --define "extra_release $EXTRA_RELEASE" \
+     --define "_sourcedir `pwd`/pkg" \
+     -ba --clean pkg/ruby-libvirt.spec
+fi
+
diff --git a/ruby-libvirt.spec b/ruby-libvirt.spec
index 2cefe2c..dd82a73 100644
--- a/ruby-libvirt.spec
+++ b/ruby-libvirt.spec
@@ -3,7 +3,7 @@
 
 Name:           ruby-libvirt
 Version:        @VERSION@
-Release:        1%{?dist}
+Release:        1%{?dist}%{?extra_release}
 Summary:        Ruby bindings for libvirt
 Group:          Development/Languages
 
-- 
1.7.4

--
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]