pirelenito / git-revision-webpack-plugin

🏗 Webpack plugin that generates VERSION and COMMITHASH files during build
https://www.npmjs.com/package/git-revision-webpack-plugin
MIT License
358 stars 48 forks source link

Is there a way to get the short-hash? #37

Closed iDVB closed 3 years ago

iDVB commented 6 years ago

Is there a way to get the short-hash?

tlattimore commented 6 years ago

According to the README the commithashCommand should be overridable. But in my testing I am not able to get it to work with something like rev-parse --short HEAD—which returns a short hash.

ream88 commented 4 years ago

I have this in my webpack config and it works perfectly fine:

new GitRevisionPlugin({
  commithashCommand: 'rev-parse --short HEAD'
})