]> TLD Linux GIT Repositories - packages/rpm-build-tools.git/commitdiff
- drop tagging and tag checking, TLD uses pkgrevs
authorMarcin Krol <hawk@tld-linux.org>
Sat, 20 Mar 2021 20:00:42 +0000 (21:00 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Sat, 20 Mar 2021 20:00:42 +0000 (21:00 +0100)
builder.sh

index be1009f405389fccbd19446021afe31d72f48287..222e6fc3e911813bdb8adfead1be32d32fc2db47 100755 (executable)
@@ -1476,23 +1476,6 @@ get_files() {
        fi
 }
 
-tag_exist() {
-# If tag exists and points to other commit exit with error
-# If it existsts and points to HEAD return 1
-# If it doesn't exist return 0
-       local _tag="$1"
-       local sha1=$(git rev-parse HEAD)
-       echo "Searching for tag $_tag..."
-       if [ -n "$DEPTH" ]; then
-               local ref=$(git ls-remote $REMOTE_PLD "refs/tags/$_tag"  | cut -c -40)
-       else
-               local ref=$(git show-ref -s "refs/tags/$_tag")
-       fi
-       [ -z "$ref" ] && return 0
-       [ "$ref" = "$sha1" ] || Exit_error err_tag_exists "$_tag"
-       return 1
-}
-
 make_tagver() {
        if [ -n "$DEBUG" ]; then
                set -x
@@ -1518,37 +1501,6 @@ make_tagver() {
        echo -n "$TAGVER"
 }
 
-tag_files() {
-       if [ -n "$DEBUG" ]; then
-               set -x
-               set -v
-       fi
-
-       echo "Version: $PACKAGE_VERSION"
-       echo "Release: $PACKAGE_RELEASE"
-
-       local _tag
-       if [ "$TAG_VERSION" = "yes" ]; then
-               _tag=`make_tagver`
-       fi
-       if [ -n "$TAG" ]; then
-               _tag="$TAG"
-       fi
-       echo "tag: $_tag"
-
-       local OPTIONS="tag $CVS_FORCE"
-
-       cd "$PACKAGE_DIR"
-
-       if tag_exist $_tag || [ -n "$CVS_FORCE" ]; then
-               update_shell_title "tag sources: $_tag"
-               git $OPTIONS $_tag || exit
-               git push $IPOPT $CVS_FORCE $REMOTE_PLD tag $_tag || Exit_error err_remote_problem $REMOTE_PLD
-       else
-               echo "Tag $_tag already exists and points to the same commit"
-       fi
-}
-
 get_pkgrev() {
        [ -z "$1" ] && return 1
        local _tmp=$(mktemp /tmp/.builder-XXXX)
@@ -2678,35 +2630,6 @@ case "$COMMAND" in
                        fi
                fi
 
-               # ./builder -bs test.spec -r AC-branch -Tp auto-ac- -tt
-               if [ -n "$TEST_TAG" ]; then
-                       local TAGVER=`
-                       make_tagver`
-                       tag_exist $TAGVER || [ $TAGVER = $CVSTAG ] || Exit_error err_tag_exists $TAGVER
-                       # check also tags created in CVS
-                       local TAGVER_CVS=$(echo $TAGVER | tr '[.@]' '[_#]')
-                       local CVSTAG_CVS=$(echo $CVSTAG | tr '[.@]' '[_#]')
-                       tag_exist $TAGVER_CVS || [ $TAGVER_CVS = $CVSTAG_CVS ] \
-                               || Exit_error err_tag_exists $TAGVER_CVS
-                       # - do not allow to build from HEAD when XX-branch exists
-                       TREE_PREFIX=$(echo "$TAG_PREFIX" | sed -e 's#^auto/\([a-zA-Z]\+\)/.*#\1#g')
-                       if [ "$TAGVER" != "$CVSTAG" -a "$TAGVER_CVS" != "$CVSTAG" -a  "$TREE_PREFIX" != "$TAG_PREFIX" ]; then
-                               TAG_BRANCH="${TREE_PREFIX}-branch"
-                               if [ -n "$DEPTH" ]; then
-                                       cmd_branches="git ls-remote --heads"
-                                       ref_prefix=refs/heads
-                               else
-                                       cmd_branches="git show-ref"
-                                       ref_prefix=refs/remotes/${REMOTE_PLD}
-                               fi
-                               TAG_STATUS=$($cmd_branches | grep -i "${ref_prefix}/$TAG_BRANCH$" | cut -c'-40')
-                               if [ -n "$TAG_STATUS" -a "$TAG_STATUS" != $(git rev-parse "$CVSTAG") ]; then
-                                       Exit_error err_branch_exists "$TAG_STATUS"
-                               fi
-                       fi
-
-               fi
-
                if [ -n "$NOSOURCE0" ] ; then
                        SOURCES=`echo $SOURCES | xargs | sed -e 's/[^ ]*//'`
                fi
@@ -2790,21 +2713,6 @@ case "$COMMAND" in
                fi
                update_md5 $SOURCES $PATCHES
                ;;
-       "tag" )
-               NOURLS=1
-               NODIST="yes"
-               init_builder
-               if [ -z "$SPECFILE" ]; then
-                       Exit_error err_no_spec_in_cmdl
-               fi
-
-               parse_spec
-               if  [ ! -d .git ]; then
-                       echo "No git reposiotory" >&2
-                       exit 101
-               fi
-               tag_files
-               ;;
        "mr-proper" )
                mr_proper
                ;;