Skip to content

Releases: qoomon/gradle-git-versioning-plugin

5.1.1

28 Sep 05:56
Compare
Choose a tag to compare
Fixes
  • if a tag is provided (and no branch) the extension behaves like in detached head state
  • if a branch is provided (and no tag) the extension behaves like in attached head state with no tags pointing to head

5.1.0

19 Aug 13:03
Compare
Choose a tag to compare
Features
  • New Placeholder ${commit.timestamp.year.2digit}

5.0.0

17 Aug 08:31
Compare
Choose a tag to compare
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 configuration (also see BREAKING CHANGES)

    Groovy DSL Example: build.gradle

    version = '0.0.0-SNAPSHOT'
    gitVersioning.apply {
        refs {
            branch('.+') {
                version = '${ref}-SNAPSHOT'
            }
            tag('v(?<version>.*)') {
                version = '${ref.version}'
            }
        }
        
        // optional fallback configuration in case of no matching ref configuration
        rev {
            version = '${commit}'
        }
    }

    Kotlin DSL Example: build.gradle.kts

    version = "0.0.0-SNAPSHOT"
    gitVersioning.apply {
        refs {
            branch(".+") {
                version = "\${ref}-SNAPSHOT"
            }
            tag('v(?<version>.*)') {
                version = "\${ref.version}"
            }
        }
        
        // optional fallback configuration in case of no matching ref configuration
        rev {
            version = "\${commit}"
        }
    }
  • 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
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 plugin execution 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

4.3.0

15 Jul 10:54
Compare
Choose a tag to compare
  • Features

    • add git describe version placeholders
      • new placeholders
        • ${describe}
        • ${describe.tag}
          • ${describe.<TAG_PATTERN_GROUP_NAME or TAG_PATTERN_GROUP_INDEX>} e.g. pattern v(?<version>.*) will create placeholder ${describe.version}
        • ${describe.distance}
  • BREAKING CHANGES

    • no longer provide project property git.dirty due to performance issues on larger projects,
      version format placeholder ${dirty} is still available

4.2.1

29 Jun 05:49
0487d61
Compare
Choose a tag to compare
v4.2.1

Merge pull request #23 from qoomon/dependabot/gradle/com.github.ben-m…

4.2.0

10 Mar 11:26
Compare
Choose a tag to compare

feat: support for environment variables in version formats

4.1.0

27 Feb 11:54
Compare
Choose a tag to compare
  • Features
    • add ability to define default or overwrite values for version and property format.
      • default value if parameter value is not set ${paramter:-<DEFAULT_VALUE>} e.g. ${buildNumber:-0}
      • overwrite value if parameter has a value ${paramter:+<OVERWRITE_VALUE>} e.g. ${dirty:+-SNAPSHOT}

Easy config

11 Feb 22:01
Compare
Choose a tag to compare

3.0.0

Features

  • simplify property replacement configuration

Breaking Changes

  • simplify property replacement configuration

    new config

    gitVersioning.apply {
      branch {
        pattern = 'master'
        versionFormat = '${version}'
        property {
          pattern = 'revision'
          valueFormat = '${branch-SNAPSHOT}'
        }
      }
    }

    old config

    gitVersioning.apply {
      branch {
        pattern = 'master'
        versionFormat = '${version}'
        property {
          pattern ='revision'
          value {
            format = '${branch-SNAPSHOT}'
          }
        }
      }
    }

Fix VERSIONING_GIT_TAG Environment Variable Behaviour

11 Aug 15:20
Compare
Choose a tag to compare
v1.2.3

fix: VERSIONING_GIT_TAG will simulate no branch

Update Git Versioning Lib

11 Aug 15:07
Compare
Choose a tag to compare
v1.2.2

feat: inherit version from parent project if not set