- # ./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
-