Browse Source

Do not fail if reldst == relsrc

Defining same reldst as relsrc is useless, but does not harm, so we can
let it slip through.
Alois Mahdal 7 years ago
parent
commit
d59dc961d9
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/include/release.sh

+ 4
- 2
src/include/release.sh View File

91
     #
91
     #
92
     local rlevel=$1     # release level (x, y or z)
92
     local rlevel=$1     # release level (x, y or z)
93
     local newtag        # new tag
93
     local newtag        # new tag
94
+    local relsrc        # release source branch (if any)
94
     local reldst        # release destination branch (if any)
95
     local reldst        # release destination branch (if any)
95
 
96
 
96
     _relck git_present
97
     _relck git_present
107
     $MKIT_DRY && return
108
     $MKIT_DRY && return
108
     git tag -m "$(_release_msg)" "$newtag"
109
     git tag -m "$(_release_msg)" "$newtag"
109
 
110
 
111
+    relsrc=$(ini 1value project:relsrc)
110
     reldst=$(ini 1value project:reldst)
112
     reldst=$(ini 1value project:reldst)
111
-    debug_var reldst
112
-    if test -n "$reldst"; then
113
+    debug_var relsrc reldst
114
+    if test -n "$reldst" && test "$reldst" != "$relsrc"; then
113
         git branch -f "$reldst" "$newtag"
115
         git branch -f "$reldst" "$newtag"
114
     fi
116
     fi
115
 }
117
 }