Skip to content

Commit

Permalink
Merge pull request #1200 from m-tmatma/feature/issue1190-rename-to-GI…
Browse files Browse the repository at this point in the history
…THUB_PR_HEAD_URL

GITHUB_COMMIT_URL_PR_HEAD から GITHUB_PR_HEAD_URL に改名
  • Loading branch information
m-tmatma authored Feb 15, 2020
2 parents 403a0e2 + a118bb3 commit 32f03fd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions appveyor_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ def __init__(self):

# appveyor の PR の最新の commit Hash
if "APPVEYOR_PULL_REQUEST_NUMBER" in self.env and "APPVEYOR_PULL_REQUEST_HEAD_COMMIT" in self.env:
# GITHUB_COMMIT_URL_PR_HEAD
# GITHUB_PR_HEAD_URL
temp = [
repoURL,
"pull",
self.env["APPVEYOR_PULL_REQUEST_NUMBER"],
"commits",
self.env["APPVEYOR_PULL_REQUEST_HEAD_COMMIT"],
]
self.var["GITHUB_COMMIT_URL_PR_HEAD"] = '/'.join(temp)
self.var["GITHUB_PR_HEAD_URL"] = '/'.join(temp)

# msbuild のログに現れる小文字に変換されてしまったファイルパスを
# もともとの大文字小文字を保存したパスに変換する。
Expand Down
4 changes: 2 additions & 2 deletions ci-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
|CI_BUILD_VERSION|CI のビルドバージョン (文字列)|×||||
|CI_REPO_NAME|リポジトリ名|×||||
|GITHUB_COMMIT_URL|GitHub の Commit URL|×||||
|GITHUB_COMMIT_URL_PR_HEAD|GitHub の PR の Head の URL|×|○ (PRのみ)|○ (PRのみ)|○ (PRのみ)|
|GITHUB_PR_HEAD_URL|GitHub の PR の Head の URL|×|○ (PRのみ)|○ (PRのみ)|○ (PRのみ)|
|GITHUB_PR_HEAD_COMMIT|GitHub の PR の Head Revision|×|○ (PRのみ)|○ (PRのみ)|○ (PRのみ)|
|GITHUB_PR_HEAD_SHORT_COMMIT|GitHub の PR の Head Revision 短縮形|×|○ (PRのみ)|○ (PRのみ)|○ (PRのみ)|
|GITHUB_PR_NUMBER|GitHub の PR 番号|×|○ (PRのみ)|○ (PRのみ)|○ (PRのみ)|
Expand Down Expand Up @@ -75,7 +75,7 @@ APPVEYOR_REPO_TAG_NAME は利用をやめて 代わりに GIT_TAG_NAME を使う
|GITHUB_PR_NUMBER_INT|GITHUB_PR_NUMBER|数値|
|GITHUB_PR_NUMBER_LABEL|GITHUB_PR_NUMBER|文字列|
|GITHUB_COMMIT_URL|GITHUB_COMMIT_URL|文字列|
|GITHUB_COMMIT_URL_PR_HEAD|GITHUB_COMMIT_URL_PR_HEAD|文字列|
|GITHUB_PR_HEAD_URL|GITHUB_PR_HEAD_URL|文字列|
|GITHUB_PR_HEAD_COMMIT|GITHUB_PR_HEAD_COMMIT|文字列|
|GITHUB_PR_HEAD_SHORT_COMMIT|GITHUB_PR_HEAD_SHORT_COMMIT|文字列|
|CI_BUILD_URL|CI_BUILD_URL|文字列|
Expand Down
10 changes: 5 additions & 5 deletions sakura/githash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ exit /b 0
@rem No PR
) else (
@rem PR URL
set "GITHUB_COMMIT_URL_PR_HEAD=%PREFIX_GITHUB%/%CI_REPO_NAME%/pull/%GITHUB_PR_NUMBER%/commits/%GITHUB_PR_HEAD_COMMIT%"
set "GITHUB_PR_HEAD_URL=%PREFIX_GITHUB%/%CI_REPO_NAME%/pull/%GITHUB_PR_NUMBER%/commits/%GITHUB_PR_HEAD_COMMIT%"
)
)
exit /b 0
Expand Down Expand Up @@ -203,7 +203,7 @@ exit /b 0
@echo CI_BUILD_URL : %CI_BUILD_URL%
@echo.
@echo GITHUB_COMMIT_URL : %GITHUB_COMMIT_URL%
@echo GITHUB_COMMIT_URL_PR_HEAD : %GITHUB_COMMIT_URL_PR_HEAD%
@echo GITHUB_PR_HEAD_URL : %GITHUB_PR_HEAD_URL%
@echo GITHUB_PR_HEAD_COMMIT : %GITHUB_PR_HEAD_COMMIT%
@echo GITHUB_PR_HEAD_SHORT_COMMIT : %GITHUB_PR_HEAD_SHORT_COMMIT%
@echo.
Expand Down Expand Up @@ -289,10 +289,10 @@ exit /b 0
echo #define GITHUB_COMMIT_URL "%GITHUB_COMMIT_URL%"
)

if "%GITHUB_COMMIT_URL_PR_HEAD%" == "" (
echo // GITHUB_COMMIT_URL_PR_HEAD is not defined
if "%GITHUB_PR_HEAD_URL%" == "" (
echo // GITHUB_PR_HEAD_URL is not defined
) else (
echo #define GITHUB_COMMIT_URL_PR_HEAD "%GITHUB_COMMIT_URL_PR_HEAD%"
echo #define GITHUB_PR_HEAD_URL "%GITHUB_PR_HEAD_URL%"
)

if "%GITHUB_PR_HEAD_COMMIT%" == "" (
Expand Down
6 changes: 3 additions & 3 deletions sakura_core/dlg/CDlgAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )
#if defined( GITHUB_COMMIT_URL )
m_UrlGitHubCommitWnd.SetSubclassWindow( GetItemHwnd( IDC_STATIC_URL_GITHUB_COMMIT ) );
#endif
#if defined( GITHUB_COMMIT_URL_PR_HEAD )
#if defined( GITHUB_PR_HEAD_URL )
m_UrlGitHubPRWnd.SetSubclassWindow( GetItemHwnd( IDC_STATIC_URL_GITHUB_PR ) );
#endif

Expand Down Expand Up @@ -344,8 +344,8 @@ BOOL CDlgAbout::OnStnClicked( int wID )
#endif
return TRUE;
case IDC_STATIC_URL_GITHUB_PR:
#if defined(GITHUB_COMMIT_URL_PR_HEAD)
::ShellExecute(GetHwnd(), NULL, _T(GITHUB_COMMIT_URL_PR_HEAD), NULL, NULL, SW_SHOWNORMAL);
#if defined(GITHUB_PR_HEAD_URL)
::ShellExecute(GetHwnd(), NULL, _T(GITHUB_PR_HEAD_URL), NULL, NULL, SW_SHOWNORMAL);
#endif
return TRUE;
}
Expand Down
4 changes: 2 additions & 2 deletions sakura_core/sakura_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ BEGIN
LTEXT "Build URL:", IDC_STATIC_URL_CI_BUILD_CAPTION, 33, 123, 71, 8, NOT WS_GROUP
LTEXT CI_BUILD_NUMBER_LABEL, IDC_STATIC_URL_CI_BUILD, 101, 123, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
#if defined( GITHUB_COMMIT_URL ) || defined( GITHUB_COMMIT_URL_PR_HEAD )
#if defined( GITHUB_COMMIT_URL ) || defined( GITHUB_PR_HEAD_URL )
LTEXT "GitHub URL:", IDC_STATIC_URL_GITHUB_CAPTION, 33, 133, 50, 8, NOT WS_GROUP
#endif
#if defined( GITHUB_COMMIT_URL )
LTEXT GIT_SHORT_COMMIT_HASH, IDC_STATIC_URL_GITHUB_COMMIT, 101, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
#if defined( GITHUB_COMMIT_URL_PR_HEAD )
#if defined( GITHUB_PR_HEAD_URL )
LTEXT GITHUB_PR_NUMBER_LABEL, IDC_STATIC_URL_GITHUB_PR, 150, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
EDITTEXT IDC_EDIT_ABOUT, 5, 146, 233, 53, ES_MULTILINE | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
Expand Down
4 changes: 2 additions & 2 deletions sakura_lang_en_US/sakura_lang_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ BEGIN
LTEXT "Build URL:", IDC_STATIC_URL_CI_BUILD_CAPTION, 33, 123, 71, 8, NOT WS_GROUP
LTEXT CI_BUILD_NUMBER_LABEL, IDC_STATIC_URL_CI_BUILD, 101, 123, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
#if defined( GITHUB_COMMIT_URL ) || defined( GITHUB_COMMIT_URL_PR_HEAD )
#if defined( GITHUB_COMMIT_URL ) || defined( GITHUB_PR_HEAD_URL )
LTEXT "GitHub URL:", IDC_STATIC_URL_GITHUB_CAPTION, 33, 133, 50, 8, NOT WS_GROUP
#endif
#if defined( GITHUB_COMMIT_URL )
LTEXT GIT_SHORT_COMMIT_HASH, IDC_STATIC_URL_GITHUB_COMMIT, 101, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
#if defined( GITHUB_COMMIT_URL_PR_HEAD )
#if defined( GITHUB_PR_HEAD_URL )
LTEXT GITHUB_PR_NUMBER_LABEL, IDC_STATIC_URL_GITHUB_PR, 150, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
EDITTEXT IDC_EDIT_ABOUT, 5, 146, 233, 53, ES_MULTILINE | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
Expand Down

0 comments on commit 32f03fd

Please sign in to comment.