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

How does plugin works without git installed in Docker container? #60

Closed uidoyen closed 3 years ago

uidoyen commented 3 years ago

I am trying to understand that how does this plugin fetch git COMMIT_HASH and able to execute git commands without git installed in Docker container.

begoat commented 3 years ago

I guess it won't be able to do that.

I encountered an error on samiliar situation. Logs are shown below.

/bin/sh: git: not found
Error resolving webpackConfig Error: Command failed: git describe --always --tags
/bin/sh: git: not found
pirelenito commented 3 years ago

Hello 👋

The plugin needs git to be available. So a solution could be to have git installed in the container or If you know you will be running in an environment without git, disable the plugin in Webpack.

pirelenito commented 3 years ago

I'll close the issue, but feel free to re-open if the answer wasn't satisfactory. 👍