瀏覽代碼

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 年之前
父節點
當前提交
d59dc961d9
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    2
      src/include/release.sh

+ 4
- 2
src/include/release.sh 查看文件

@@ -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
 }