001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.util;
007
008import edu.umd.cs.findbugs.annotations.NonNull;
009
010/**
011 * Provides version information for a runtime dependency or application.
012 */
013public interface IVersionInfo {
014  /**
015   * The subject's name.
016   *
017   * @return the name
018   */
019  @NonNull
020  String getName();
021
022  /**
023   * The subject's version.
024   *
025   * @return the version
026   */
027  @NonNull
028  String getVersion();
029
030  /**
031   * The time the subject was last built.
032   *
033   * @return the build time
034   */
035  @NonNull
036  String getBuildTimestamp();
037
038  /**
039   * The git repository URL used to retrieve the branch.
040   *
041   * @return the git repository URL
042   */
043  @NonNull
044  String getGitOriginUrl();
045
046  /**
047   * The last git commit hash.
048   *
049   * @return the commit hash
050   */
051  @NonNull
052  String getGitCommit();
053
054  /**
055   * The current git branch.
056   *
057   * @return the git branch
058   */
059  @NonNull
060  String getGitBranch();
061
062  /**
063   * The closest tag in the git commit history.
064   *
065   * @return a tag name
066   */
067  @NonNull
068  String getGitClosestTag();
069}