❔ Saving current commit information to a file
I'm trying to save the current commit's information using this in the .csproj
but it just keeps saying
The system cannot find the file specified.
, does that mean it can't find the git
command or actually the file,
or maybe there's a better way to get the commit info?
git log -1 --pretty=%H%n%an%n%ae%n%cn%n%ce%n%cI%n%s > ".\CurrentCommit"
works just fine when run in a regular terminal
Build log: https://pastebin.com/raw/2dpKPdq58 Replies
can you try
MSBuildProjectDir
insteadMakes the path
/CurrentCommit
and same messagewhat's with all those
<
and >
in the git command?
git log -1 --pretty=%H%n%an%n%ae%n%cn%n%ce%n%cI%n%s > ".\CurrentCommit"
doesn't feature those at allEscaping
%
%
escaped is %<25>
afaikthat would surprise me very much
yeah seems like an issue for dotnet/msbuild
i tried around with it a bunch and somehow the exec task can't get the correct format
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.