Skip to content

7.0.0

Choose a tag to compare

@qoomon qoomon released this 17 Aug 08:31
Features
  • Add GitHub Actions, GitLab CI and Jenkins environment variable support

    • GitHub Actions: if $GITHUB_ACTIONS == true, GITHUB_REF is considered
    • GitLab CI: if $GITLAB_CI == true, CI_COMMIT_BRANCH and CI_COMMIT_TAG are considered
    • Circle CI: if $CIRCLECI == true, CIRCLE_BRANCH and CIRCLE_TAG are considered
    • Jenkins: if JENKINS_HOME is set, BRANCH_NAME and TAG_NAME are considered
  • Simplify xml configuration (also see BREAKING CHANGES)

    Example: maven-git-versioning-extension.xml

    <configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-7.0.0.xsd">
    
        <refs>
            <ref type="branch">
                <pattern>.+</pattern>
                <version>${ref}-SNAPSHOT</version>
                <properties>
                    <foo>${ref}</foo>
                </properties>
            </ref>
    
            <ref type="tag">
                <pattern><![CDATA[v(?<version>.*)]]></pattern>
                <version>${ref.version}</version>
            </ref>
        </refs>
    
        <!-- optional fallback configuration in case of no matching ref configuration-->
        <rev>
            <version>${commit}</version>
        </rev>
    
    </configuration>
  • New option to consider tag configs on branches (attached HEAD), enabled by <refs considerTagsOnBranches="true">

    • If enabled, first matching branch or tag config will be used for versioning
  • prevent unnecessary updates of pom.xml to prevent unwanted rebuilds (#129 kudos to @ls-urs-keller)

BREAKING CHANGES
  • There is no default config anymore, if no <ref> configuration is matching current git situation and no <rev> configuration has been
    defined a warning message will be logged and extension will be skipped.
  • Placeholder Changes (old -> new)
    • ${branch} -> ${ref}
    • ${tag} -> ${ref}
    • ${REF_PATTERN_GROUP} -> ${ref.REF_PATTERN_GROUP}
    • ${describe.TAG_PATTERN_GROUP} -> ${describe.tag.TAG_PATTERN_GROUP}
  • preferTags option was removed
    • use <refs considerTagsOnBranches="true"> instead