Skip to content

autoIncrementPatch not working #182

@henkhofs

Description

@henkhofs

Autoincrementpatch set to true in the jgitver.config.xml does not seem to work for me, anything i'm doing wrong?

Jgitver maven plugin version 1.9.0

<configuration xmlns="http://jgitver.github.io/maven/configuration/1.1.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
    <mavenLike>false</mavenLike>   <!-- deprecated, use 'strategy' instead -->
    <strategy>MAVEN</strategy>
    <policy>MAX</policy>    <!-- LookupPolicy to select the base tag/commit for the version computation -->
    <autoIncrementPatch>true</autoIncrementPatch>
    <useCommitDistance>false</useCommitDistance>
    <useDirty>false</useDirty>
    <useGitCommitId>false</useGitCommitId>
    <useSnapshot>true</useSnapshot> <!-- use -SNAPSHOT in CONFIGURABLE strategy -->
    <gitCommitIdLength>8</gitCommitIdLength>  <!-- between [8,40] -->
    <maxSearchDepth>1</maxSearchDepth>  <!-- upper or equal to 1, ommited otherwise, default to infinite -->
    <nonQualifierBranches>master,main</nonQualifierBranches> <!-- comma separated, example "master,integration" -->
    <useDefaultBranchingPolicy>true</useDefaultBranchingPolicy>   <!-- uses jgitver#BranchingPolicy#DEFAULT_FALLBACK as fallback branch policy-->
    <exclusions>
	<exclusion>.m2</exclusion>
    </exclusions>
</configuration>

output from maven-antrun echo plugin:

[INFO] Executing tasks
[WARNING]      [echo] used version: 0.0.2-fix_build-SNAPSHOT
[WARNING]      [echo] version calculated: 0.0.2-fix_build-SNAPSHOT
[WARNING]      [echo] dirty: true
[WARNING]      [echo] head_committer_name: henkhofs
[WARNING]      [echo] head_commit_datetime: Wed Mar 20 21:05:33 2024 +0100
[WARNING]      [echo] git_sha1_full: 28e116e8d55083b6963f4150c934f74c42446949
[WARNING]      [echo] git_sha1_8: 28e116e8
[WARNING]      [echo] branch_name: fix-build
[WARNING]      [echo] head_tags: 0.0.2
[WARNING]      [echo] head_annotated_tags:
[WARNING]      [echo] head_lightweight_tags: 0.0.2
[WARNING]      [echo] base_tag: 0.0.2
[WARNING]      [echo] all_tags: 0.0.2,0.0.1
[WARNING]      [echo] all_annotated_tags:
[WARNING]      [echo] all_lightweight_tags: 0.0.2,0.0.1
[WARNING]      [echo] all_version_tags: 0.0.2,0.0.1
[WARNING]      [echo] all_version_annotated_tags:
[WARNING]      [echo] all_version_lightweight_tags: 0.0.2,0.0.1
[WARNING]      [echo] currpatch: 2
[WARNING]      [echo] nextpatch: 0.0.2
[WARNING]      [echo] nextminor: 0.1.0
[WARNING]      [echo] nextmajor: 0.0.2

Looks like the next_patch_version is not calculated correctly, anything i'm missing or did I find a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions