/gitpropsplugin

Provides an easy way to write out git information to the git properties file for usage by sprint boot's /info endpoint

Primary LanguageGroovyApache License 2.0Apache-2.0

gitprops

wercker status

What is it?

gitprops is a Gradle plugin:

  • provides an easy way to write out git information to the git properties file for usage by sprint boot's /info endpoint

See Grgit for details on the Git library used underneath, including configuration for authentication.

Usage

NOTE: requires Java 7 (or higher)

  • add plugin repository to your buildscript
  • apply plugin: com.homedepot.gitprops
  • add dependsOn to include it in your build pipeline - project.tasks.jar.dependsOn('gitprops')
buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath("com.homedepot.gitprops:GitPropsPlugin:1.0.8")
    }
}
apply plugin: 'com.homedepot.gitprops'
  • see also ./example/build.gradle

Acknowledgements

This very simple plugin makes uses of the incredible work done by Andrew Oberstar on the gradle-git plugin, which provides additional flexibility and functionality

Significant simplification of original plugin based on article by Lieven Doclo

TODO

  • add environment sanity checks (git installed, in a git repository, etc)
  • add additional error messages (windows specific problems)