001 002 003package gov.nist.secauto.metaschema.cli.processor; 004 005import static org.fusesource.jansi.Ansi.ansi; 006 007import java.io.PrintStream; 008 009public class Version implements VersionInfo { 010 011 public static final String VERSION = "2.0.1"; 012 public static final String BUILD_TIMESTAMP = "2024-11-09 21:13"; 013 public static final String COMMIT = "964b845"; 014 015 public Version() { 016 } 017 018 @Override 019 public String getVersion() { 020 return VERSION; 021 } 022 023 @Override 024 public String getBuildTime() { 025 return BUILD_TIMESTAMP; 026 } 027 028 @Override 029 public String getCommit() { 030 return COMMIT; 031 } 032 033 @Override 034 public void generateExtraInfo(PrintStream out) { 035 out.println(ansi() 036 .a("Metaschema version ").bold().a(getVersion()).boldOff() 037 .a(" on commit ").bold().a(getCommit()).boldOff() 038 .a(" built at ").bold().a( getBuildTime()).reset()); 039 } 040}