]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
Exit with error when cannot push tags
[packages/rpm-build-tools.git] / builder.sh
index f61fe67218a67fbd46e2b0f3cd4b29eef9c35db8..fbdecf8f44ba827ef44f45c928b87b5a72f625d9 100755 (executable)
@@ -834,7 +834,7 @@ get_spec() {
 
                # create symlinks for tools
                if [ "$SYMLINK_TOOLS" != "no" ]; then
-                       for a in dropin md5 adapter builder {relup,compile,repackage,rsync,pearize}.sh pldnotify.awk; do
+                       for a in dropin md5 adapter builder {relup,compile,repackage,pearize}.sh pldnotify.awk; do
                                [ -f $a ] || continue
                                ln -sf ../$a $ASSUMED_NAME
                                cvsignore_df $a
@@ -1297,12 +1297,12 @@ tag_files() {
        if [ "$TAG_VERSION" = "yes" ]; then
                update_shell_title "tag sources: $TAGVER"
                git $OPTIONS $TAGVER || exit
-               git push $CVS_FORCE $REMOTE_PLD tag $TAGVER
+               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 $chunk || exit
-               git push $CVS_FORCE $REMOTE_PLD tag $TAG
+               git push $CVS_FORCE $REMOTE_PLD tag $TAG || Exit_error err_remote_problem $REMOTE_PLD
        fi
 }
 
@@ -1945,8 +1945,9 @@ init_rpm_dir() {
        echo "Initializing rpm directories to $TOP_DIR from $GIT_SERVER"
        mkdir -p $TOP_DIR $rpmdir $buildir $srpmdir
 
-       GIT_WORK_TREE=${TOP_DIR}/rpm-build-tools git clone  ${GIT_SERVER}/rpm-build-tools.git || 
-       for a in dropin md5 adapter builder mirrors {relup,compile,repackage,rsync,pearize}.sh pldnotify.awk; do
+       cd "$TOP_DIR"
+       git clone  ${GIT_SERVER}/rpm-build-tools.git ${TOP_DIR}/rpm-build-tools
+       for a in dropin md5 adapter builder mirrors {relup,compile,repackage,pearize}.sh pldnotify.awk; do
                ln -s rpm-build-tools/$a .
        done
        init_builder
@@ -1956,13 +1957,10 @@ mr_proper() {
        init_builder
        NOCVSSPEC="yes"
        DONT_PRINT_REVISION="yes"
-       get_spec
-       parse_spec
 
        # remove spec and sources
-       $RPMBUILD --clean --rmsource --rmspec --nodeps --define "_specdir $PACKAGE_DIR" --define "_sourcedir $PACKAGE_DIR" $SPECFILE
+       $RPMBUILD --clean --rmsource --rmspec --nodeps --define "_specdir $PACKAGE_DIR" --define "_sourcedir $PACKAGE_DIR" $PACKAGE_DIR/$SPECFILE
        rm -rf $PACKAGE_DIR/.git .gitignore
-       cd $__PWD
        rmdir --ignore-fail-on-non-empty $PACKAGE_DIR
 }
 
@@ -2388,7 +2386,7 @@ case "$COMMAND" in
                        if [ "$TREE_PREFIX" != "$TAG_PREFIX" ]; then
                                TAG_BRANCH="${TREE_PREFIX}-branch"
                                TAG_STATUS=$(git branch -r | grep -i "${REMOTE_PLD}/$TAG_BRANCH$" | sed "s# *${REMOTE_PLD}/##")
-                               if [ "$TAG_STATUS" != "$CVSTAG" ]; then
+                               if [ -n "$TAG_STATUS" -a "$TAG_STATUS" != "$CVSTAG" ]; then
                                        Exit_error err_branch_exists "$TAG_STATUS"
                                fi
                        fi
This page took 0.04271 seconds and 4 git commands to generate.