New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

git-sha-util

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-sha-util

Utility for getting the current HEAD SHA value from git

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

git-sha-util

Utility for getting the current HEAD SHA value from git

installation

npm install git-sha-util

usage

CLI

  • To get the current SHA: $ git-sha --sha
  • To get the current, short SHA: $ git-sha --short-sha
  • To update the package.json file with the current, short SHA: $ git-sha --npm

Note, to use the CLI you will need to install git-sha-util globally

JS

const sha = require('git-sha-util');

// Log out the current SHA
sha.sha().then(sha => console.log(sha));

// Log out the current, short SHA
sha.shaShort().then(sha => console.log(sha));

// Update the package.json file with the current, short SHA
sha.npm();

FAQs

Package last updated on 04 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts