[packages/rpm-build-tools] Simplify code in tag_files as TAGVER and TAG are mutually exclusive
draenog
draenog at pld-linux.org
Wed Jul 11 02:40:07 CEST 2012
commit c9100f106eac17349bd30c2c007b5241df198b79
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Wed Jul 11 00:54:00 2012 +0100
Simplify code in tag_files as TAGVER and TAG are mutually exclusive
builder.sh | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/builder.sh b/builder.sh
index 718da32..900bd6a 100755
--- a/builder.sh
+++ b/builder.sh
@@ -1366,29 +1366,22 @@ tag_files() {
echo "Version: $PACKAGE_VERSION"
echo "Release: $PACKAGE_RELEASE"
- local TAGVER
+ local _tag
if [ "$TAG_VERSION" = "yes" ]; then
- TAGVER=`make_tagver`
- echo "tag: $TAGVER"
+ _tag=`make_tagver`
fi
if [ -n "$TAG" ]; then
- echo "tag: $TAG"
+ _tag="$TAG"
fi
+ echo "tag: $_tag"
local OPTIONS="tag $CVS_FORCE"
cd "$PACKAGE_DIR"
- if [ "$TAG_VERSION" = "yes" ]; then
- update_shell_title "tag sources: $TAGVER"
- git $OPTIONS $TAGVER || exit
- git push $CVS_FORCE $REMOTE_PLD tag $TAGVER || Exit_error err_remote_problem $REMOTE_PLD
- fi
- if [ -n "$TAG" ]; then
- update_shell_title "tag sources: $TAG"
- git $OPTIONS $TAG || exit
- git push $CVS_FORCE $REMOTE_PLD tag $TAG || Exit_error err_remote_problem $REMOTE_PLD
- fi
+ update_shell_title "tag sources: $_tag"
+ git $OPTIONS $_tag || exit
+ git push $CVS_FORCE $REMOTE_PLD tag $_tag || Exit_error err_remote_problem $REMOTE_PLD
}
branch_files() {
More information about the pld-cvs-commit
mailing list