Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

バージョン情報で git の commit hash を表示する #18

Closed
m-tmatma opened this issue May 30, 2018 · 3 comments
Closed

バージョン情報で git の commit hash を表示する #18

m-tmatma opened this issue May 30, 2018 · 3 comments
Labels
enhancement ■機能追加
Milestone

Comments

@m-tmatma
Copy link
Member

バージョン情報で git の commit hash を表示すると便利だと思います。

SubWCRev と同様のプログラムで
GitWCRev というプログラムも存在するが、
TortoiseGit がインストールされていないと使えない。

Appveyor の Build environment には
TortoiseGit がリストにはない。

ただ通常の git コマンドだけでも以下のようなバッチファイルで、git の commit hash を
取り出せるので、svnrev.h のようなファイルを作ることも可能だと思う。

@echo off
for /f "usebackq" %%s in (`git show -s --format^=%%H`) do (
    set COMMITID=%%s
)

echo %COMMITID%

m-tmatma added a commit to m-tmatma/sakura that referenced this issue May 30, 2018
m-tmatma added a commit to m-tmatma/sakura that referenced this issue May 30, 2018
m-tmatma added a commit to m-tmatma/sakura that referenced this issue May 30, 2018
m-tmatma added a commit to m-tmatma/sakura that referenced this issue May 30, 2018
m-tmatma added a commit to m-tmatma/sakura that referenced this issue May 30, 2018
@m-tmatma
Copy link
Member Author

#19 でプルリクエスト投げました。

@berryzplus
Copy link
Contributor

良いと思います。

GitHub移行作業の一環として、rev表示も新環境に合わせるのが筋かと思います。

Git-showのオプションで最新コミットの情報を出せた気がするのでバッチファイルの中身は要検討かなと思っています。

@kobake
Copy link
Member

kobake commented Jun 1, 2018

#19 マージ済みなのでこちらも閉じます。

@kobake kobake closed this as completed Jun 1, 2018
@m-tmatma m-tmatma added the enhancement ■機能追加 label Jun 11, 2018
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this issue Jun 11, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this issue Jun 11, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this issue Jun 11, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this issue Jun 11, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this issue Jun 11, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this issue Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ■機能追加
Projects
None yet
Development

No branches or pull requests

3 participants