2.0.1 • Published 4 years ago

git-commit-id v2.0.1

Weekly downloads
756
License
MIT
Repository
github
Last release
4 years ago

git-commit-id Build Status Modern Node

Returns commit id (commit sha) of git repository

This package is fast, has no dependencies, has synchronous API, doesn't require git binary.

Useful e.g. for CI, release for Sentry or build id for Next.js

Installation

yarn add --dev git-commit-id

If you're using npm you can use: npm install --save-dev git-commit-id.

Usage

const gitCommitId = require('git-commit-id')

const commitId = gitCommitId()

Custom directory

You can pass cwd option to specify custom git directory:

const commitId = gitCommitId({ cwd: __dirname })

License

MIT

2.0.1

4 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago