![]() ![]() The plugin checks the previous release, your changes, and the semVerLimitRelease to ensure your changes are really Will halt the build (compile, publish, etc.) if your changes would not make a valid semantic version. (There was a feature to add those separately but it has been To add an extra identifier like "-alpha" or "-rc1" or "-rally" it must be included it in the version directlyīy overriding the "version" setting directly. Version determination can be complicated, because git can be complicated. You shouldn't do this without good reason. Creating a Release Recommended: -DreleaseĬreating a release is done by passing a release arg. On CI systems,Įnsure that any git plugins are configured to not use shallow clones. If the incorrect version is being returned and tags areĪccessible, you may be using a shallow clone, in which case git fetch -unshallow will fix the issue. Warning: Git Versioning may misbehave with shallow clones. Those types of plugins require more manual effort on the part of the developer. This plugin is intentionally different than something like sbt-release which stores.If there is no tag in the commit history, the number appended after the version number will reflect the number of commits.Git status -porcelain returns a non-empty result. A build will be flagged as not clean (and will have a -dirty-SNAPSHOT identifier applied) if.The hash does not have a 'g' prefix like the output of git describe.(I'm not clear on why this is, but it is legacy behavior.) But it is not incremented if there are noĬommits. The patch version is incremented if there are commits, dirty or not.GitVersioningPlugin set version=2.0.0-1-400b9ac-SNAPSHOT GitVersioningPlugin set versionFromGit=1.4.3-1-400b9ac-SNAPSHOT The version.override arg sets the version and overrides all other sources. The version is generally derived from git, though there are a couple ways to change that. Putting it all together (including all optionals) gives you v1.2.3-dirty-SNAPSHOT. (Optional) -dirty-SNAPSHOT if uncommitted changes.(Optional) Short hash of the current commit. ![]() GitVersioningPlugin set version=2.0.0-dirty-SNAPSHOT GitVersioningPlugin set versionFromGit=2.0.0-dirty-SNAPSHOT Skipping fetching tags from git remotes to enable, set the system property toFetch=true ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |