I'm no expert on this stuff, I just tend to hack around until I get it working but...
I don't think echo exists as an executable file. I think it's built into cmd.exe. So If I wanted to write out the contents of a file from inside eclipse's build steps I would use something like this
Code: Select all
cmd /c type ${workspace_loc:/PulseGenerator_Lib/version.h}
I'm invoking cmd.exe giving it the /c flag to interpret the remaining string as a command (note I'm using "type" not "echo"). The stuff inside {} is my path to the file I want to pass to the type command.
Now Git may have a similar issue, the DOS shell may be doing some translation for you. In fact my path environment shows it leads to a git.cmd not the git.exe. Try this:
Code: Select all
"C:\Program Files (x86)\Git\bin\git" describe
If you don't have spaces in your path name to the git.exe file you won't need the quotes, otherwise you will. When I do the above in a post build step it does execute git describe. My project isn't actually in git so I get "fatal: Not a git repository (or any of the parent directories): .git" but that is a git describe generated error so it indicates to me I'm running the proper command and getting the expected error.