I'm trying to handle a git script in VSTS tasks with Powershell, but it's not working as expected.
What I'm doing is fetching latest commits messages after the latest tag to put inside a Release Notes, this is the base git command:
git log `git describe --tags --abbrev=0`..HEAD --no-decorate --no-merges --abbrev=0 --pretty=format:"%s"
But Powershell doesn't accept this format, so I do the following:
$latestTag = git describe --tags --abbrev=0
$releaseNotes = git log $latestTag..HEAD --no-decorate --no-merges --abbrev=0 --pretty=format:"%s"
It seems that when I put the variable $latestTag next to ..HEAD it breaks line, if I specify the tag eg. v1.2.9 instead of the variable it works well.
What can I do to make it run properly ? Thanks.
$latestTag..HEADin"