Skip to content

psnider/git-get-commit-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5a73916 · Mar 10, 2017

History

5 Commits
Nov 26, 2016
Jul 10, 2016
Jul 6, 2016
Jul 6, 2016
Jul 10, 2016
Jul 10, 2016
Jan 20, 2017
Mar 10, 2017
Mar 10, 2017
Jul 10, 2016
Jul 10, 2016
Mar 10, 2017
Nov 26, 2016
Nov 26, 2016

Repository files navigation

git-get-commit-id

Summary

This module determines the git commit-id for the repo in the current directory.

Usage

To check whether a git workspace is clean:

var git = require('./git-get-commit-id');

git.getGitStatus((error, results) => {
    console.log(`this workspace is ${results.is_clean ? '' : 'not'} clean`)
})

To get the commit-id:

git.getGitCommitID(function (error, results) {
    console.log(`git commit-id=${results.id}`);
});

You can check the other parameters for error and other information, if needed.

Setup for Build

npm install

Build

Build the software:

npm run build

Remove the generated files:

npm run clean

Test

Run the tests:

npm run test

Problems?

Please report them as issues on the GitHub repo.

About

get the git commit-id for the current directory

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published