Open phatpaul opened 1 year ago
FYI, I've solved my own problem by removing this plugin and just using a simple 2-liner.
const execSync = require('child_process').execSync;
...
console.log( execSync('git describe --tags --always --dirty').toString('utf8').replace(/^\s+|\s+$/g, '') );
I need my version number to be compiled into my app. I want it to reflect the latest tag, the number of commits since that tag, and whether the working copy is dirty.
This is how it is typically done:
(I don't really care if the hash is there or not, so it could also be 3.5.3-8-dirty. But I need to know if the app was built off the actual commit that the tag is pointing to, or a later commit, which the -8 tells me.).
But when I run:
This plugin is only returning the tag name without the expected suffix. I think the issue may be with the of 0 will suppress long format, only showing the closest tag."
--abbrev=0
. The git documentation says: "Angit version 2.38.1.windows.1