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 を表示する #19

Merged

Conversation

m-tmatma
Copy link
Member

@m-tmatma m-tmatma commented May 30, 2018

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

git の commit hash の取得

git show -s --format=%H

git の commit hash (短い形式) の取得

git show -s --format=%h

バッチファイルのエスケープ

http://www.robvanderwoude.com/escapechars.php

  • = は ^=
  • % は %%

コマンド出力を変数に代入する方法

http://bleis-tift.hatenablog.com/entry/20080502/1209689071

@kobake
Copy link
Member

kobake commented May 31, 2018

ご対応ありがとうございます。動作良さそうです。

pre-build で PowerShell 使えればもう少しシンプルになりそうなんですけどね……今ちょっと調べています。

HIWORD(dwVersionLS),
LOWORD(dwVersionLS)
);
#elif (SVN_REV == 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

svnrev 関連はもう使わないので「削除」しちゃってOKです

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

svnrev 関連はもう使わないので「削除」しちゃってOKです

a69e8d0 で削除しました。
別のプルリクエストで対応しようと思ってたのですが、
このプルリクエストで対応しました。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

お手数おかけします、ありがとうございます!

@@ -165,7 +167,14 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )
// �o�[�W����&���r�W�������
DWORD dwVersionMS, dwVersionLS;
GetAppVersionInfo( NULL, VS_VERSION_INFO, &dwVersionMS, &dwVersionLS );
#if (SVN_REV == 0)
#if defined(GIT_COMMIT_HASH)
auto_sprintf(szMsg, _T("Ver. %d.%d.%d.%d\r\n(hash ") _T(GIT_COMMIT_HASH) _T(")\r\n"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここは hash よりも GitHash と明示したほうが良さそうに思いました

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここは hash よりも GitHash と明示したほうが良さそうに思いました

eee259f で対応しました。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます~ 🙏

#if (SVN_REV != 0)
#if defined(GIT_SHORT_COMMIT_HASH)
" (hash " GIT_SHORT_COMMIT_HASH ")"
#elif (SVN_REV != 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここは hash よりも GitHash と明示したほうが良さそうに思いました(上と同様)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここは hash よりも GitHash と明示したほうが良さそうに思いました(上と同様)

上と同様 eee259f で対応しました。

@kobake kobake added this to the next release milestone May 31, 2018
@m-tmatma
Copy link
Member Author

#28 はリファクタリングネタとして、このプルリクエストとは別に対応するとして、このプルリクエストは一旦マージしませんか?

@kobake
Copy link
Member

kobake commented Jun 1, 2018

そですね、挙動問題ないので一旦マージしちゃいます。
dialog

ご対応ありがとうございました!

@kobake kobake merged commit 5ea149e into sakura-editor:master Jun 1, 2018
@m-tmatma m-tmatma deleted the feature/issue18-git-commit-hash branch June 1, 2018 22:13
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this pull request Jun 11, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this pull request Jun 11, 2019
…-commit-hash

バージョン情報で git の commit hash を表示する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants