Closed lholman closed 9 years ago
Ahhh, I think this is an edge case when you have no git repo in the directory, can you try this?
c:\[path-to-solution]\>git init
c:\[path-to-solution]\>Build.bat
If that still doesn't work then try making a new commit locally, i.e.
c:\[path-to-solution]\>git add --all
c:\[path-to-solution]\>git commit -am "Initial commit"
c:\[path-to-solution]\>Build.bat
Could you let me know if either work, I'll put a test in around the Set-BuildNumberWithGitCommitDetail.psm1
module to check for a git repo first and give a better Error if it turns out to be the above.
From @mani0070:
This second option works for me.
Satisfied with PR #15
Originally from @mani0070:
mani0070 commented 6 days ago WARNING: Setting [minor] version number to: 1. Build FAILED. 5 tasks, 3 errors, 3 warnings 00:00:00.8281157 Set-BuildNumberWithGitCommitDetail : You cannot call a method on a null-valued expression. At C:\Users\mani_000\Documents\Visual Studio 2013\Projects\AzureCloudService1\OneBuild.build.ps1:103 char:41
... alVersion = Set-BuildNumberWithGitCommitDetail -major $major -minor $ ...