Skip to content

axi92/git-hash-package

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-hash-package

What does it do?

This package gets info about your git repo (long hash + short hash + branch) and stores this data in your package.json.

Why?

I faced next issue: If we can't use git log inside Docker container in git subrepo in production, we need to store info about git in local files. Storing info about the current git state in package.json was a good decision. This module solves my issue.

Install

npm i git+https://github.com/axi92/git-hash-package.git

You can run it local with npx git-hash-package

Or if you want to run it globally(Thanks to @teebu and his awesome PR):

  npm i -g git+https://github.com/axi92/git-hash-package.git

Usage

git-hash-package # run
git-hash-package --verbose # run with verbose output about current git state (short + long hashes + branch)

Author

Vladimir Metnew vladimirmetnew@gmail.com

License

MIT

About

Set git hash in package.json

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%