Commit 459169ed authored by Vitaly Lipatov's avatar Vitaly Lipatov

use get_default_txtrelease where possible

parent 0efd493d
......@@ -194,8 +194,8 @@ do
fi
# If non alt release, set initial alt release
if get_release $i | grep -v "^alt" >/dev/null ; then
set_release $i "alt1"
if get_release $i | grep -q -v "^alt" && get_release $i | grep -q -v "^$(get_default_txtrelease)" ; then
reset_release $i
fi
# If it was PLD spec
......
......@@ -243,7 +243,7 @@ do
if [ -n "${spec/*spec/}" ] ; then
print_error
fi
set_specdir $spec
# Set version if needed
......@@ -251,7 +251,7 @@ do
CURVER=$(get_version $spec)
set_version $spec $GSSETVERSION
if [ "$CURVER" != "$GSSETVERSION" ] ; then
[ -n "$GSSETRELEASE" ] || GSSETRELEASE=alt1
[ -n "$GSSETRELEASE" ] || GSSETRELEASE=$(get_default_txtrelease)1
set_release $spec $GSSETRELEASE
echo "Set new $GSSETVERSION-$GSSETRELEASE version for $spec"
else
......
......@@ -35,7 +35,7 @@ SPEC=$1
VER=$1
# need for rpmgs
GSSETRELEASE=$2
test -n "$GSSETRELEASE" || GSSETRELEASE=alt1
test -n "$GSSETRELEASE" || GSSETRELEASE=$(get_default_txtrelease)1
export GSSETRELEASE
test -f "$SPEC" || SPEC=$(get_gear_spec)
......
......@@ -94,8 +94,9 @@ pkg_release_check()
{
# assert MENV
local STREL=$(get_default_txtrelease)
# support alt in any case
local STRELDEF=alt
# FIXME: do we need it?
# can be set from korinf config
[ -z "$KORINFTARGETRELEASE" ] || STREL=$KORINFTARGETRELEASE
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
......
......@@ -113,6 +113,6 @@ do
done
LISTBUILT=$(strip_spaces "$LISTBUILT")
test -z "$LISTBUILT" && fatal "Error: List for build is empty. Check if file is exist."
test -z "$LISTBUILT" && fatal "Error: List for build is empty. Check if the file is exists."
}
......@@ -33,7 +33,7 @@ get_etersoft_srpm_path()
# translate ftp to local path
SOURCE=$(echo "$SOURCEFTP" | sed -e "s|.*://.*$COMPANYFTP|$TARGETFTPBASE|g")
# rewrite V.E.R./sources with $ALPHA/sources if $ALPHA exist
# rewrite V.E.R./sources with $ALPHA/sources if $ALPHA exists
if [ -n "$ALPHA" ] ; then
BSOURCE=$(dirname $SOURCE)
BNSOURCE=$(basename $BSOURCE)
......
......@@ -76,9 +76,20 @@ set_var()
subst "s|\($2:\).*\$|\1 $3|" $1
}
# Args: spec, new_release
# set release to arg2 or reset numeration if arg2 is empty
set_release()
{
local RELEASE=$2
[ -n "$RELEASE" ] || RELEASE="$(get_txtrelease $1)1"
set_var $1 Release $RELEASE
}
# Args: spec, new_release
# Set release to arg2 or to the default start value if arg2 is empty
reset_release()
{
local RELEASE=$2
[ -n "$RELEASE" ] || RELEASE="$(get_default_txtrelease)1"
set_var $1 Release $RELEASE
}
......
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