Explorar el Código

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 hace 7 años
padre
commit
d59dc961d9
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4
    2
      src/include/release.sh

+ 4
- 2
src/include/release.sh Ver fichero

@@ -91,6 +91,7 @@ _release() {
91 91
     #
92 92
     local rlevel=$1     # release level (x, y or z)
93 93
     local newtag        # new tag
94
+    local relsrc        # release source branch (if any)
94 95
     local reldst        # release destination branch (if any)
95 96
 
96 97
     _relck git_present
@@ -107,9 +108,10 @@ _release() {
107 108
     $MKIT_DRY && return
108 109
     git tag -m "$(_release_msg)" "$newtag"
109 110
 
111
+    relsrc=$(ini 1value project:relsrc)
110 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 115
         git branch -f "$reldst" "$newtag"
114 116
     fi
115 117
 }