batファイルにしてから カスタムアクションにしたらどうでしょうか?
http://www.networld.co.jp/is/pdf/CustomActionBatch_.pdf
▽2
●
a-kuma3 ●100ポイント ベストアンサー |
git archive --format=zip HEAD `git diff --name-only HEAD HEAD^` -o archive.zip
↑って、バッククォートがあるので、すんなりとはバッチファイルにできないですよね。
試してないですけど、こんな感じのバッチファイルになるんじゃないかと思います。
for /f "delims=" %%A in ('git diff --name-only HEAD "HEAD^"') do set DIFF_LIST=%%A git archive --format=zip HEAD %DIFF_LIST% -o archive.zip
後、git コマンドは SourceTree に付いてくるものを使ってるでしょうか。
Atlassian の Q&A サイトで こんなやりとりがあったのを見つけましたので、こちらもご参考に。
I've tried putting "git" in the "script target", which errors with no explanation. I've tried putting "cmd" in the script target with "/C git" in the "Parameters" and gotten a "'git' is not recognized" error.
You can add git to your path or specify the path to git.exe in your .bat file.
You should be able to find git.exe here:%USERPROFILE%\AppData\Local\Atlassian\SourceTree\git_local\binHow to run a git command as a custom action? - Atlassian Answers