Skip to content

Commit 9d20ce1

Browse files
committed
feat: test feat version calculate
1 parent 3bf2828 commit 9d20ce1

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,43 +90,31 @@ public static String getCliVersion() throws IOException {
9090
String commitMessage = properties.getProperty("git.commit.message.full", "Unknown");
9191
Pattern pattern = Pattern.compile("^(fix|feat|chore|docs|style|refactor|test|perf|build|ci):");
9292
Matcher matcher = pattern.matcher(commitMessage);
93-
System.out.println("commitId: " + commitId);
94-
System.out.println("tag: " + tag);
95-
System.out.println("commitCount: " + commitCount);
96-
System.out.println("commitMessage: " + commitMessage);
9793
if(tag.isEmpty() || tag.equals("Unknown")) {
9894
String tags = properties.getProperty("git.tags", "Unknown");
99-
System.out.println("tags: " + tags);
10095
tag = tags;
10196
if(tags.isEmpty() || tags.equals("Unknown")) {
102-
System.out.println("tags if in");
10397
InputStream versionInputStream = Client.class.getResourceAsStream("/META-INF/lastCli.version");
10498
if (versionInputStream != null) {
10599
BufferedReader reader = new BufferedReader(new InputStreamReader(versionInputStream, StandardCharsets.UTF_8));
106100
String version = "";
107101
String line;
108102
if ((line = reader.readLine()) != null) {
109103
version = line;
110-
System.out.println("version: " + version);
111104
if (matcher.find()) {
112-
System.out.println("matcher.find()");
113105
tag = calculateNewVersion(version, matcher.group(1));
114106
}
115107
}
116108
}
117109
}
118110
}else {
119111
if(!commitCount.isEmpty() && !commitCount.equals("0") && !commitCount.equals("Unknown")) {
120-
System.out.println("commitCount if in");
121112
if (matcher.find()) {
122-
System.out.println("matcher.find()");
123113
tag = calculateNewVersion(tag, matcher.group(1));
124114
commitCount = "0";
125115
}
126116
}
127117
}
128-
System.out.println("after tag: " + tag);
129-
System.out.println("commitCount: " + commitCount);
130118
if ((commitCount.isEmpty() || commitCount.equals("0") || commitCount.equals("Unknown")) && (!tag.isEmpty() && !tag.equals("Unknown"))) {
131119
return tag;
132120
}

0 commit comments

Comments
 (0)