版本号处理
This commit is contained in:
parent
6f4e2a22ac
commit
4bc3d6c99b
|
|
@ -135,7 +135,7 @@ public class VersionUtil {
|
|||
char lastChar = version.charAt(version.length() - 1);
|
||||
boolean isLetter = Character.isLetter(lastChar);
|
||||
if (!isLetter) {
|
||||
return version + "a";
|
||||
return version + ".a";
|
||||
} else {
|
||||
int lastCharIndex = version.length() - 1;
|
||||
char newLastChar = (char) (lastChar + 1);
|
||||
|
|
@ -143,6 +143,9 @@ public class VersionUtil {
|
|||
if (newLastChar > 'z') {
|
||||
// Handle case where the last character is 'z'
|
||||
StringBuilder sb = new StringBuilder(version.substring(0, lastCharIndex));
|
||||
if(!sb.toString().contains(".")) {
|
||||
sb.append(".");
|
||||
}
|
||||
sb.append("a").append('a');
|
||||
return sb.toString();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue