last-git-hash
v0.1.0
Published
NodeJS module for get hash checksum in current project without install git (as a rule for use in project generating in docker).
Downloads
4
Readme
LastGitHash (last-git-hash)
NodeJS module for get hash checksum in current project without install git (as a rule for use in project generating in docker).
Usage
Import
const LGH = require('last-git-hash');
Get hash for current head
const getLastHashForCurrentHead = LGH();
Get hash by name branch
const getHeadHashFromMaster = LGH('master');
Get hash by name branch and name parent folder (if .git
folder out current package)
const getHeadHashFromMasterInCustomFolder = LGH('master', 'last-git-hash');
CLI
node index.js branch folder
branch
– Name branch (require if usefolder
, by default optional);folder
– Name folder from list parent folders (optional).