|
|
@ -65,6 +65,9 @@ import java.util.HashSet; |
|
|
|
import static javax.swing.JOptionPane.QUESTION_MESSAGE; |
|
|
|
import static javax.swing.JOptionPane.QUESTION_MESSAGE; |
|
|
|
|
|
|
|
|
|
|
|
public class EnvChangeEntrance { |
|
|
|
public class EnvChangeEntrance { |
|
|
|
|
|
|
|
private static final String BRANCH_TAG = "#"; |
|
|
|
|
|
|
|
private static final String BRANCH_BEGIN = "-"; |
|
|
|
|
|
|
|
private static final int BRANCH_SUB_LENGTH = 13; |
|
|
|
|
|
|
|
|
|
|
|
public static EnvChangeEntrance getInstance() { |
|
|
|
public static EnvChangeEntrance getInstance() { |
|
|
|
return HOLDER.singleton; |
|
|
|
return HOLDER.singleton; |
|
|
@ -375,8 +378,8 @@ public class EnvChangeEntrance { |
|
|
|
* @return 格式化后的版本号 |
|
|
|
* @return 格式化后的版本号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String formatBranch(String branch) { |
|
|
|
private String formatBranch(String branch) { |
|
|
|
if (branch.contains("#")) { |
|
|
|
if (branch.contains(BRANCH_TAG)) { |
|
|
|
return branch.substring(branch.lastIndexOf("-") + 1, branch.length() - 13); |
|
|
|
return branch.substring(branch.lastIndexOf(BRANCH_BEGIN) + 1, branch.length() - BRANCH_SUB_LENGTH); |
|
|
|
} |
|
|
|
} |
|
|
|
return branch; |
|
|
|
return branch; |
|
|
|
} |
|
|
|
} |
|
|
|