0.1.0 • Published 6 years ago

last-git-hash v0.1.0

Weekly downloads
60
License
MIT
Repository
github
Last release
6 years ago

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 use folder, by default optional);
  • folder – Name folder from list parent folders (optional).