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

lastCommitDateTimeCommand: Invalid object name %H #76

Open luigigargioni opened 2 years ago

luigigargioni commented 2 years ago

I tried customising the format of the last commit date and it works in Git bash, but I get the following error when I try to compile with webpack

const gitRevision = new GitRevisionPlugin({
  branch: true,
  lastCommitDateTimeCommand:
    "log -1 --pretty='%cd' --date=format:'%d/%m/%Y %H:%M:%S'",
})
Error: Command failed: git log -1 --pretty='%cd' --date=format:'%d/%m/%Y %H:%M:%S'
fatal: invalid object name '%H'.

I think that could be some problem about the quotes