I'm currently using this to git tag a commit in Linux via bash:
"tag": "VER=v$(node -p \"require('./package.json').version\") && git tag -a \"$VER\" -m \"$VER\"",
Does anyone know a way to make this both Linux and Windows friendly?
I'm currently using this to git tag a commit in Linux via bash:
"tag": "VER=v$(node -p \"require('./package.json').version\") && git tag -a \"$VER\" -m \"$VER\"",
Does anyone know a way to make this both Linux and Windows friendly?
Ok just found the easiest way: https://stackoverflow.com/a/46006249/1137669
Set npm to use bash on Windows.
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"