]> source.dussan.org Git - gitblit.git/commitdiff
Refine startup ascii artwork
authorJames Moger <james.moger@gitblit.com>
Wed, 2 Jul 2014 21:06:14 +0000 (17:06 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 2 Jul 2014 21:43:20 +0000 (17:43 -0400)
src/main/java/com/gitblit/Constants.java
src/main/java/com/gitblit/GitBlitServer.java

index 3e307537cfd41350121dc807cb61a2842d4b29c1..8d6e249a157bf3abf0a735ee99dd0a25b9453a0d 100644 (file)
@@ -146,6 +146,17 @@ public class Constants {
                return getManifestValue("build-date", "PENDING");\r
        }\r
 \r
+       public static String getASCIIArt() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("  _____  _  _    _      _  _  _").append('\n');\r
+               sb.append(" |  __ \\(_)| |  | |    | |(_)| |").append('\n');\r
+               sb.append(" | |  \\/ _ | |_ | |__  | | _ | |_").append('\n');\r
+               sb.append(" | | __ | || __|| '_ \\ | || || __|").append("  ").append("http://gitblit.com").append('\n');\r
+               sb.append(" | |_\\ \\| || |_ | |_) || || || |_").append("   ").append("@gitblit").append('\n');\r
+               sb.append("  \\____/|_| \\__||_.__/ |_||_| \\__|").append("  ").append(Constants.getVersion()).append('\n');\r
+               return sb.toString();\r
+       }\r
+\r
        private static String getManifestValue(String attrib, String defaultValue) {\r
                Class<?> clazz = Constants.class;\r
                String className = clazz.getSimpleName() + ".class";\r
index b40e21f821889914acf15176d1667dbf0b95ddfc..cd269806d2eb114c5272a4f70d0db084f295819e 100644 (file)
@@ -208,22 +208,7 @@ public class GitBlitServer {
                }
 
                logger = LoggerFactory.getLogger(GitBlitServer.class);
-               logger.info(Constants.BORDER);
-               logger.info("            _____  _  _    _      _  _  _");
-               logger.info("           |  __ \\(_)| |  | |    | |(_)| |");
-               logger.info("           | |  \\/ _ | |_ | |__  | | _ | |_");
-               logger.info("           | | __ | || __|| '_ \\ | || || __|");
-               logger.info("           | |_\\ \\| || |_ | |_) || || || |_");
-               logger.info("            \\____/|_| \\__||_.__/ |_||_| \\__|");
-               int spacing = (Constants.BORDER.length() - Constants.getGitBlitVersion().length()) / 2;
-               StringBuilder sb = new StringBuilder();
-               while (spacing > 0) {
-                       spacing--;
-                       sb.append(' ');
-               }
-               logger.info(sb.toString() + Constants.getGitBlitVersion());
-               logger.info("");
-               logger.info(Constants.BORDER);
+               logger.info("\n" + Constants.getASCIIArt());
 
                System.setProperty("java.awt.headless", "true");