Skip to content

Commit 5bac826

Browse files
committed
fix: test commitCount content
1 parent 06e6f93 commit 5bac826

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ public static String getCliVersion() throws IOException {
115115
}
116116
}
117117
} 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+
118128
if(!commitCount.isEmpty() && !commitCount.equals("0") && !commitCount.equals("Unknown")) {
119129
System.out.println("commitCount if in");
120130
if (matcher.find()) {
@@ -126,6 +136,7 @@ public static String getCliVersion() throws IOException {
126136
}
127137
}
128138
System.out.println("after tag: " + tag);
139+
System.out.println("commitCount: " + commitCount);
129140
if ((commitCount.isEmpty() || commitCount.equals("0") || commitCount.equals("Unknown")) && (!tag.isEmpty() && !tag.equals("Unknown"))) {
130141
return tag;
131142
}

0 commit comments

Comments
 (0)