From 401f1d6c5adeb35a2cc879a81e881eb871d421b1 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 31 Oct 2011 20:32:36 +0000 Subject: [PATCH] redhat rules --- id-release | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/id-release b/id-release index 874d503..8462c78 100755 --- a/id-release +++ b/id-release @@ -1,10 +1,18 @@ #!/bin/sh +# Copyright (c) 2011 IndexData ApS. http://indexdata.com +# Author: Wolfram Schneider +# +# id-release - a helper script to build a release & packaging for debian + redhat + +# die early +set -e usage () { echo "usage $0 version" exit 1 } +###################################################################### if [ -e "pom.xml" ]; then java=true else @@ -21,7 +29,8 @@ if [ `ls |egrep '\.spec$' | wc -l` -eq 0 ]; then echo "No *.spec file found" usage else - package=`ls |egrep '\.spec$' | head -1` + spec=`ls |egrep '\.spec$' | head -1` + package=`basename $spec .spec` fi case $1 in @@ -57,3 +66,13 @@ if $java; then echo "mvn versions:set -DnewVersion=$version-SNAPSHOT" fi +###################################################################### +echo "" +echo "# On RedHat or centos, please run the commands" +echo "$HOME/proj/git-tools/id-deb-build/mkdist.sh" +echo "sudo cp $package-$version.tar.gz /usr/src/redhat/SOURCES/" +echo "sudo rpmbuild -ba $spec" +echo "$HOME/proj/git-tools/id-rpm-build/upload-rpms.sh $spec" +echo "# on kebab run update-yum-archive.sh" + + -- 1.7.10.4