GithubHelp home page GithubHelp logo

samilton / git-build-info Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madvay/git-build-info

0.0 1.0 0.0 269 KB

Gradle plugin to incorporate Git repo info into your build

License: Apache License 2.0

Groovy 100.00%

git-build-info's Introduction

git-build-info

Gradle plugin to incorporate Git repo info into your build

Build Status

Usage

In the build.gradle file:

plugins {
    id "com.madvay.tools.build.gitbuildinfo" version "0.1.5-alpha"
}

buildStamp {
    // The git commit SHA will be appended to this url to generate the final url.
    repoBaseUrl "https://github.com/USER/REPO/tree/"
    // BuildInfo.java will be added under this package, in a
    // generated build/ directory.
    packageName "com.example"
}

This plugin eats its own dogfood, so look at build.gradle to see how we use it.

Sample BuildInfo.java

Most of the variables added are straightforward. GIT_IS_CLEAN is true iff you have no changes in your git working directory (or your git index). This means the state of the code can be fully specified by the GIT_COMMIT in your local repository.

// This is an auto-generated file.  Do not edit.
// Generated using: https://github.com/madvay/git-build-info

package com.madvay.tools.build.gitbuildinfo;

public class BuildInfo {
    public static final String VERSION = "0.0.7-alpha-SNAPSHOT";
    public static final String GIT_COMMIT = "ea9f50061005f58811c5846089c4e7a26e3cdd29";
    public static final String URL = "https://github.com/madvay/source/git-build-info/tree/ea9f50061005f58811c5846089c4e7a26e3cdd29";
    public static final String TIMESTAMP = "20150823T225946+0000";
    public static final boolean GIT_IS_CLEAN = false;
}

License

See LICENSE and NOTICE.

git-build-info's People

Contributors

advaydev1 avatar madvayapiaccess avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.