Skip to content

Commit

Permalink
fix: test commitCount content
Browse files Browse the repository at this point in the history
  • Loading branch information
sukidayou committed Dec 16, 2024
1 parent 06e6f93 commit 5bac826
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/casbin/util/VersionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ public static String getCliVersion() throws IOException {
}
}
} else {
if(!commitCount.isEmpty()){
System.out.println("!commitCount.isEmpty()");
}
if(!commitCount.equals("0")){
System.out.println("!commitCount.equals(\"0\"");
}
if(!commitCount.equals("Unknown")){
System.out.println("!commitCount.equals(\"Unknown\")");
}

if(!commitCount.isEmpty() && !commitCount.equals("0") && !commitCount.equals("Unknown")) {
System.out.println("commitCount if in");
if (matcher.find()) {
Expand All @@ -126,6 +136,7 @@ public static String getCliVersion() throws IOException {
}
}
System.out.println("after tag: " + tag);
System.out.println("commitCount: " + commitCount);
if ((commitCount.isEmpty() || commitCount.equals("0") || commitCount.equals("Unknown")) && (!tag.isEmpty() && !tag.equals("Unknown"))) {
return tag;
}
Expand Down

0 comments on commit 5bac826

Please sign in to comment.