Commit 8b43c2ed authored by Vitaly Lipatov's avatar Vitaly Lipatov

add git tag checking

parent 64c810ae
...@@ -91,6 +91,7 @@ check_gear_and_tag() ...@@ -91,6 +91,7 @@ check_gear_and_tag()
local RESULT=0 local RESULT=0
local GEARCTAG=gear-create-tag local GEARCTAG=gear-create-tag
test -n "$TAG" && echo "Create $TAG tag..."
# FIXME: uncomment use-agent in ~/.gnupg/gpg.conf, but with ssh access to build server I got # FIXME: uncomment use-agent in ~/.gnupg/gpg.conf, but with ssh access to build server I got
# gpg: problem with the agent - disabling agent use # gpg: problem with the agent - disabling agent use
# gpg: Invalid passphrase; please try again ... # gpg: Invalid passphrase; please try again ...
...@@ -105,7 +106,9 @@ check_gear_and_tag() ...@@ -105,7 +106,9 @@ check_gear_and_tag()
if is_gear $SPECDIR ; then if is_gear $SPECDIR ; then
# needed correct user.name/user.email for get GPG id # needed correct user.name/user.email for get GPG id
pushd $SPECDIR >/dev/null pushd $SPECDIR >/dev/null
# default: <VERSION>-<RELEASE>
$GEARCTAG $FORCE || RESULT=1 $GEARCTAG $FORCE || RESULT=1
test -z "$TAG" || git tag -v "$TAG" || fatal "Tag $TAG is missed in repo"
popd >/dev/null popd >/dev/null
fi fi
return $RESULT return $RESULT
...@@ -178,8 +181,7 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then ...@@ -178,8 +181,7 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
build_rpms_name "$LISTNAMES" build_rpms_name "$LISTNAMES"
pkg_release_check pkg_release_check
TAG=$VERSION-$RELEASE TAG=$VERSION-$RELEASE
echo "Create $TAG tag..." check_gear_and_tag "$TAG" # || fatal "Can't make tag"
check_gear_and_tag # || fatal "Can't make tag"
$ETERBUILDBIN/gpush $GIRARHOST || fatal "Git push via gpush failed. Possibly you need to run ginit for create remote repo." $ETERBUILDBIN/gpush $GIRARHOST || fatal "Git push via gpush failed. Possibly you need to run ginit for create remote repo."
echo echo
echo "Run build $BASENAME at $GIRARHOST" echo "Run build $BASENAME at $GIRARHOST"
...@@ -231,7 +233,7 @@ pkg_release_check $LISTBUILT ...@@ -231,7 +233,7 @@ pkg_release_check $LISTBUILT
# if only one file # if only one file
if [ -r "$LISTBUILT" ] ; then if [ -r "$LISTBUILT" ] ; then
check_gear_and_tag check_gear_and_tag ""
fi fi
......
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