Skip to content

Commit 3bf2828

Browse files
committed
fix: else part has error
1 parent 5bac826 commit 3bf2828

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

src/main/java/org/casbin/util/VersionUtil.java

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,14 @@ public static String getCliVersion() throws IOException {
114114
}
115115
}
116116
}
117-
} else {
118-
if(!commitCount.isEmpty()){
119-
System.out.println("!commitCount.isEmpty()");
120-
}
121-
if(!commitCount.equals("0")){
122-
System.out.println("!commitCount.equals(\"0\"");
123-
}
124-
if(!commitCount.equals("Unknown")){
125-
System.out.println("!commitCount.equals(\"Unknown\")");
126-
}
127-
128-
if(!commitCount.isEmpty() && !commitCount.equals("0") && !commitCount.equals("Unknown")) {
129-
System.out.println("commitCount if in");
130-
if (matcher.find()) {
131-
System.out.println("matcher.find()");
132-
tag = calculateNewVersion(tag, matcher.group(1));
133-
commitCount = "0";
134-
}
117+
}
118+
}else {
119+
if(!commitCount.isEmpty() && !commitCount.equals("0") && !commitCount.equals("Unknown")) {
120+
System.out.println("commitCount if in");
121+
if (matcher.find()) {
122+
System.out.println("matcher.find()");
123+
tag = calculateNewVersion(tag, matcher.group(1));
124+
commitCount = "0";
135125
}
136126
}
137127
}

0 commit comments

Comments
 (0)