#!/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
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
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"
+
+