Commit 49759503 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmrb: rewrite to support multiple dirs/spec in common task

parent 497e0528
#!/bin/sh
# 2006, 2008, 2013 (c) Etersoft www.etersoft.ru
# 2006, 2008, 2013, 2016 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
......@@ -20,37 +20,49 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
exit 0
fi
set_girar_host $1 && shift
SPEC=$1
# allow run with spec file (obsoleted)
[ -r "$SPEC" ] && shift
[ -s "$SPEC" ] || SPEC=$(get_gear_spec)
[ -s "$SPEC" ] || fatal "Can't find spec file. Run $0 --help for help."
VER=$1
parse_r()
{
VER=$1
case "$2" in
case "$2" in
-*)
fatal "No options are supported. See --help."
;;
*)
esac
esac
# need for rpmgs
GSSETRELEASE=$2
}
set_girar_host $1 && shift
# need for rpmgs
GSSETRELEASE=$2
test -n "$GSSETRELEASE" || GSSETRELEASE=$(get_txtrelease $SPEC)1
export GSSETRELEASE
parse_cmd_pre_spec "$@"
docmd $ETERBUILDBIN/rpmgs $SPEC $VER || fatal "Error with get source"
add_changelog_helper "- new version $(get_version $SPEC) (with rpmrb script)" $SPEC || echog "Changelog entry already exists"
parse_r $LISTARGS
if is_gear ; then
# assure we have only specs or src.rpm
LISTNAMES=$(repodirs_to_specs $LISTNAMES)
#[ -s "$SPEC" ] || fatal "Can't find spec file. Run $0 --help for help."
for SPEC in $LISTNAMES ; do
set_specdir $SPEC
docmd cd $SPECDIR || fatal
test -n "$GSSETRELEASE" || GSSETRELEASE=$(get_txtrelease $SPEC)1
export GSSETRELEASE
docmd $ETERBUILDBIN/rpmgs $SPEC $VER || fatal "Error with get source"
add_changelog_helper "- new version $(get_version $SPEC) (with rpmrb script)" $SPEC || echog "Changelog entry already exists"
if is_gear ; then
#git diff $SPEC
git_commit_ignore_nothing $SPEC -m "update spec to new build $(get_version $SPEC) (with rpmrb script)" || exit 1
fi
fi
cd - >/dev/null
done
showcmd $ETERBUILDBIN/rpmbsh -i $SPEC
$ETERBUILDBIN/rpmbsh -i $SPEC || fatal "Error with build in hasher"
docmd $ETERBUILDBIN/rpmbs $GIRARHOST -u $SPEC || fatal "Error with upload"
showcmd $ETERBUILDBIN/rpmbsh -i $LISTNAMES
$ETERBUILDBIN/rpmbsh -i -u $LISTNAMES
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment