diff --git a/README.md b/README.md index 151e30a..e3e106f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,15 @@ To access the new property, import the config whenever needed. import config from '../config/environment'; ... - console.log(config.currentRevision); + console.log(config.currentRevision); //=> will be the first 10 chars of the current sha + console.log(config.longRevision); //=> will be the current sha + console.log(config.tag); //=> will be the tag for the current sha (or `null` if no tag exists) + console.log(config.branch); //=> will be the current branch + console.log(config.committer); //=> will be the committer for the current sha + console.log(config.committerDate); //=> will be the commit date for the current sha + console.log(config.author); //=> will be the author for the current sha + console.log(config.authorDate); //=> will be the authored date for the current sha + console.log(config.commitMessage); //=> will be the commit message for the current sha ... ``` diff --git a/config/environment.js b/config/environment.js index 37360fd..eee9374 100644 --- a/config/environment.js +++ b/config/environment.js @@ -6,9 +6,14 @@ module.exports = function(/* environment, appConfig */) { var currentInfo = gitRepoInfo(); return { - currentRevision: currentInfo.abbreviatedSha, - longRevision: currentInfo.sha, - tag: currentInfo.tag, - branch: currentInfo.branch + currentRevision: currentInfo.abbreviatedSha, //=> will be the first 10 chars of the current sha + longRevision: currentInfo.sha, //=> will be the current sha + tag: currentInfo.tag, //=> will be the tag for the current sha (or `null` if no tag exists) + branch: currentInfo.branch, //=> will be the current branch + committer: currentInfo.committer, //=> will be the committer for the current sha + committerDate: currentInfo.committerDate, //=> will be the commit date for the current sha + author: currentInfo.author, //=> will be the author for the current sha + authorDate: currentInfo.authorDate, //=> will be the authored date for the current sha + commitMessage: currentInfo.commitMessage //=> will be the commit message for the current sha }; }; diff --git a/package.json b/package.json index 4b491d2..ddcab10 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,6 @@ "configPath": "tests/dummy/config" }, "dependencies": { - "git-repo-info": "^1.0.2" + "git-repo-info": "^1.3.1" } }