|
17 | 17 |
|
18 | 18 | package pl.project13.core;
|
19 | 19 |
|
| 20 | +/** |
| 21 | + * A class that represents all properties that may be generated by the plugin and exposed to maven. |
| 22 | + */ |
20 | 23 | public class GitCommitPropertyConstant {
|
21 |
| - // these properties will be exposed to maven |
| 24 | + /** |
| 25 | + * Represents the current branch name. Falls back to commit-id for detached HEAD. |
| 26 | + */ |
22 | 27 | public static final String BRANCH = "branch";
|
| 28 | + /** |
| 29 | + * Represents the count of commits that your local branch is ahead in perspective to the remote branch |
| 30 | + * (usually the case when your local branch has committed changes that are not pushed yet to the remote branch). |
| 31 | + */ |
23 | 32 | public static final String LOCAL_BRANCH_AHEAD = "local.branch.ahead";
|
| 33 | + /** |
| 34 | + * Represents the count of commits that your local branch is behind in perspective to the remote branch |
| 35 | + * (usually the case when there are commits in the remote branch that are not yet integrated into your local branch). |
| 36 | + */ |
24 | 37 | public static final String LOCAL_BRANCH_BEHIND = "local.branch.behind";
|
| 38 | + /** |
| 39 | + * A working tree is said to be "dirty" if it contains modifications |
| 40 | + * which have not been committed to the current branch. |
| 41 | + */ |
25 | 42 | public static final String DIRTY = "dirty";
|
26 |
| - // only one of the following two will be exposed, depending on the commitIdGenerationMode |
| 43 | + /** |
| 44 | + * Represents the commit’s SHA-1 hash. Note this is exchangeable with the git.commit.id.full property |
| 45 | + * and might not be exposed. See {@code commitIdGenerationMode}. |
| 46 | + */ |
27 | 47 | public static final String COMMIT_ID_FLAT = "commit.id";
|
| 48 | + /** |
| 49 | + * Represents the commit’s SHA-1 hash. Note this is exchangeable with the git.commit.id property |
| 50 | + * and might not be exposed. See {@code commitIdGenerationMode}. |
| 51 | + */ |
28 | 52 | public static final String COMMIT_ID_FULL = "commit.id.full";
|
| 53 | + /** |
| 54 | + * Represents the abbreviated (shorten version) commit hash. |
| 55 | + */ |
29 | 56 | public static final String COMMIT_ID_ABBREV = "commit.id.abbrev";
|
| 57 | + /** |
| 58 | + * Represents an object a human readable name based on a the commit (provides git describe for the given commit). |
| 59 | + */ |
30 | 60 | public static final String COMMIT_DESCRIBE = "commit.id.describe";
|
| 61 | + /** |
| 62 | + * Represents the same value as git.commit.id.describe, |
| 63 | + * just with the git hash part removed (the g2414721 part from git describe). |
| 64 | + */ |
31 | 65 | public static final String COMMIT_SHORT_DESCRIBE = "commit.id.describe-short";
|
| 66 | + /** |
| 67 | + * Represents the git user name that is configured where the properties have been generated. |
| 68 | + */ |
32 | 69 | public static final String BUILD_AUTHOR_NAME = "build.user.name";
|
| 70 | + /** |
| 71 | + * Represents the git user eMail that is configured where the properties have been generated. |
| 72 | + */ |
33 | 73 | public static final String BUILD_AUTHOR_EMAIL = "build.user.email";
|
| 74 | + /** |
| 75 | + * Represents the (formatted) timestamp when the last build was executed. |
| 76 | + * If written to the git.properties file represents the latest build time when that file was written / updated. |
| 77 | + */ |
34 | 78 | public static final String BUILD_TIME = "build.time";
|
| 79 | + /** |
| 80 | + * Represents the project version of the current maven project. |
| 81 | + */ |
35 | 82 | public static final String BUILD_VERSION = "build.version";
|
| 83 | + /** |
| 84 | + * Represents the hostname where the properties have been generated. |
| 85 | + */ |
36 | 86 | public static final String BUILD_HOST = "build.host";
|
| 87 | + /** |
| 88 | + * The git.build.number* variables are available on some hosted CIs and can be used to identify the |
| 89 | + * "number" of the build. This represents a project specific build number. |
| 90 | + */ |
37 | 91 | public static final String BUILD_NUMBER = "build.number";
|
| 92 | + /** |
| 93 | + * The git.build.number* variables are available on some hosted CIs and can be used to identify the |
| 94 | + * "number" of the build. This represents a system wide unique build number. |
| 95 | + */ |
38 | 96 | public static final String BUILD_NUMBER_UNIQUE = "build.number.unique";
|
| 97 | + /** |
| 98 | + * Represents the user name of the user who performed the commit. |
| 99 | + */ |
39 | 100 | public static final String COMMIT_AUTHOR_NAME = "commit.user.name";
|
| 101 | + /** |
| 102 | + * Represents the user eMail of the user who performed the commit. |
| 103 | + */ |
40 | 104 | public static final String COMMIT_AUTHOR_EMAIL = "commit.user.email";
|
| 105 | + /** |
| 106 | + * Represents the raw body (unwrapped subject and body) of the commit message. |
| 107 | + */ |
41 | 108 | public static final String COMMIT_MESSAGE_FULL = "commit.message.full";
|
| 109 | + /** |
| 110 | + * Represents the subject of the commit message - may not be suitable for filenames. |
| 111 | + */ |
42 | 112 | public static final String COMMIT_MESSAGE_SHORT = "commit.message.short";
|
| 113 | + /** |
| 114 | + * Represents the (formatted) time stamp when the commit has been performed. |
| 115 | + */ |
43 | 116 | public static final String COMMIT_TIME = "commit.time";
|
| 117 | + /** |
| 118 | + * Represents the (formatted) time stamp when the commit has been originally performed. |
| 119 | + */ |
44 | 120 | public static final String COMMIT_AUTHOR_TIME = "commit.author.time";
|
| 121 | + /** |
| 122 | + * Represents the (formatted) time stamp when the commit has been performed. |
| 123 | + */ |
45 | 124 | public static final String COMMIT_COMMITTER_TIME = "commit.committer.time";
|
| 125 | + /** |
| 126 | + * Represents the URL of the remote repository for the current git project. |
| 127 | + */ |
46 | 128 | public static final String REMOTE_ORIGIN_URL = "remote.origin.url";
|
| 129 | + /** |
| 130 | + * Represents a list of tags which contain the specified commit. |
| 131 | + */ |
47 | 132 | public static final String TAGS = "tags";
|
| 133 | + /** |
| 134 | + * Represents the name of the closest available tag. |
| 135 | + * The closest tag may depend on your git describe config that may or may not take lightweight tags into consideration. |
| 136 | + */ |
48 | 137 | public static final String CLOSEST_TAG_NAME = "closest.tag.name";
|
| 138 | + /** |
| 139 | + * Represents the number of commits to the closest available tag. |
| 140 | + * The closest tag may depend on your git describe config that may or may not take lightweight tags into consideration. |
| 141 | + */ |
49 | 142 | public static final String CLOSEST_TAG_COMMIT_COUNT = "closest.tag.commit.count";
|
| 143 | + /** |
| 144 | + * Represents the total count of all commits in the current repository. |
| 145 | + */ |
50 | 146 | public static final String TOTAL_COMMIT_COUNT = "total.commit.count";
|
51 | 147 |
|
52 | 148 | }
|
0 commit comments