Skip to content

Commit

Permalink
Merge pull request #585 from m-tmatma/feature/git-remote-origin-url
Browse files Browse the repository at this point in the history
GIT_URL → GIT_REMOTE_ORIGIN_URL に名前変更
  • Loading branch information
m-tmatma authored Oct 27, 2018
2 parents 2c1844a + cd2abfe commit ad611b4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions appveyor.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
----|----|----
| GIT_SHORT_COMMIT_HASH | git の commit Hash の先頭8文字 | git 環境が有効な場合 |
| GIT_COMMIT_HASH | git の commit Hash | git 環境が有効な場合 |
| GIT_URL | git remote URL (origin) | git 環境が有効な場合 |
| GIT_REMOTE_ORIGIN_URL | git remote origin URL | git 環境が有効な場合 |
| GITHUB_COMMIT_URL | gitHub で対応する commit に対する URL | appveyor でのビルドのみ有効 |
| GITHUB_COMMIT_URL_PR_HEAD | gitHub の Pull Request の commit に対応する URL | appveyor での PR のビルドのみ有効 |
| APPVEYOR_SHORTHASH | commit hash の先頭8文字 | appveyor でのビルドのみ有効 |
Expand All @@ -153,7 +153,7 @@
| ---- | ---- | ---- |
| GIT_SHORT_COMMIT_HASH | GIT_SHORT_COMMIT_HASH | 文字列 |
| GIT_COMMIT_HASH | GIT_COMMIT_HASH | 文字列 |
| GIT_URL | GIT_URL | 文字列 |
| GIT_REMOTE_ORIGIN_URL | GIT_REMOTE_ORIGIN_URL | 文字列 |
| APPVEYOR_URL | APPVEYOR_URL | 文字列 |
| APPVEYOR_REPO_NAME | APPVEYOR_REPO_NAME | 文字列 |
| APPVEYOR_REPO_TAG_NAME | APPVEYOR_REPO_TAG_NAME | 文字列 |
Expand Down
12 changes: 6 additions & 6 deletions sakura/githash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ if "%GIT_ENABLED%" == "1" (
set GIT_COMMIT_HASH=%%s
)
for /f "usebackq" %%s in (`git config --get remote.origin.url`) do (
set GIT_URL=%%s
set GIT_REMOTE_ORIGIN_URL=%%s
)
) else (
set GIT_SHORT_COMMIT_HASH=
set GIT_COMMIT_HASH=
set GIT_URL=
set GIT_REMOTE_ORIGIN_URL=
)

@rem get back to the original directory
Expand Down Expand Up @@ -73,7 +73,7 @@ if not "%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" == "" (

@echo GIT_SHORT_COMMIT_HASH : %GIT_SHORT_COMMIT_HASH%
@echo GIT_COMMIT_HASH : %GIT_COMMIT_HASH%
@echo GIT_URL : %GIT_URL%
@echo GIT_REMOTE_ORIGIN_URL : %GIT_REMOTE_ORIGIN_URL%
@echo APPVEYOR_URL : %APPVEYOR_URL%
@echo APPVEYOR_REPO_NAME : %APPVEYOR_REPO_NAME%
@echo APPVEYOR_REPO_TAG_NAME: %APPVEYOR_REPO_TAG_NAME%
Expand Down Expand Up @@ -145,10 +145,10 @@ if "%GIT_COMMIT_HASH%" == "" (
) else (
echo #define GIT_COMMIT_HASH "%GIT_COMMIT_HASH%"
)
if "%GIT_URL%" == "" (
echo // GIT_URL is not defined
if "%GIT_REMOTE_ORIGIN_URL%" == "" (
echo // GIT_REMOTE_ORIGIN_URL is not defined
) else (
echo #define GIT_URL "%GIT_URL%"
echo #define GIT_REMOTE_ORIGIN_URL "%GIT_REMOTE_ORIGIN_URL%"
)

if "%APPVEYOR_URL%" == "" (
Expand Down
10 changes: 5 additions & 5 deletions sakura_core/dlg/CDlgAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )
#endif

// 3行目
#ifdef GIT_URL
cmemMsg.AppendString( _T("(GitURL ") _T(GIT_URL) _T(")\r\n"));
#ifdef GIT_REMOTE_ORIGIN_URL
cmemMsg.AppendString( _T("(GitURL ") _T(GIT_REMOTE_ORIGIN_URL) _T(")\r\n"));
#endif

// 段落区切り
Expand Down Expand Up @@ -259,7 +259,7 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )

// URLウィンドウをサブクラス化する
m_UrlUrWnd.SetSubclassWindow( GetItemHwnd( IDC_STATIC_URL_UR ) );
#ifdef GIT_URL
#ifdef GIT_REMOTE_ORIGIN_URL
m_UrlGitWnd.SetSubclassWindow( GetItemHwnd( IDC_STATIC_URL_GIT ) );
#endif
#ifdef APPVEYOR_BUILD_NUMBER_LABEL
Expand Down Expand Up @@ -322,8 +322,8 @@ BOOL CDlgAbout::OnStnClicked( int wID )
{
#if defined(APPVEYOR_BUILD_URL)
::ShellExecute(GetHwnd(), NULL, _T(APPVEYOR_BUILD_URL), NULL, NULL, SW_SHOWNORMAL);
#elif defined(GIT_URL)
::ShellExecute(GetHwnd(), NULL, _T(GIT_URL), NULL, NULL, SW_SHOWNORMAL);
#elif defined(GIT_REMOTE_ORIGIN_URL)
::ShellExecute(GetHwnd(), NULL, _T(GIT_REMOTE_ORIGIN_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 @@ -108,9 +108,9 @@ BEGIN
LTEXT S_COPYRIGHT, IDC_STATIC, 33, 75, 205, 8, NOT WS_GROUP | SS_NOPREFIX
LTEXT "Project Sakura-Editor:", IDC_STATIC_URL_CAPTION, 33, 103, 71, 8, NOT WS_GROUP
LTEXT "https://sakura-editor.github.io/", IDC_STATIC_URL_UR, 101, 103, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#ifdef GIT_URL
#ifdef GIT_REMOTE_ORIGIN_URL
LTEXT "Source URL:", IDC_STATIC_GIT_CAPTION, 33, 113, 71, 8, NOT WS_GROUP
LTEXT GIT_URL, IDC_STATIC_URL_GIT, 101, 113, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
LTEXT GIT_REMOTE_ORIGIN_URL, IDC_STATIC_URL_GIT, 101, 113, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
#ifdef APPVEYOR_BUILD_NUMBER_LABEL
LTEXT "Build URL:", IDC_STATIC_URL_APPVEYOR_CAPTION, 33, 123, 71, 8, NOT WS_GROUP
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 @@ -113,9 +113,9 @@ BEGIN
LTEXT S_COPYRIGHT_TRANSLATION,IDC_STATIC,74,90,164,8,SS_NOPREFIX | NOT WS_GROUP
LTEXT "Project Sakura-Editor:", IDC_STATIC_URL_CAPTION, 33, 103, 71, 8, NOT WS_GROUP
LTEXT "https://sakura-editor.github.io/", IDC_STATIC_URL_UR, 101, 103, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#ifdef GIT_URL
#ifdef GIT_REMOTE_ORIGIN_URL
LTEXT "Source URL:", IDC_STATIC_GIT_CAPTION, 33, 113, 71, 8, NOT WS_GROUP
LTEXT GIT_URL, IDC_STATIC_URL_GIT, 101, 113, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
LTEXT GIT_REMOTE_ORIGIN_URL, IDC_STATIC_URL_GIT, 101, 113, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
#ifdef APPVEYOR_BUILD_NUMBER_LABEL
LTEXT "Build URL:", IDC_STATIC_URL_APPVEYOR_CAPTION, 33, 123, 71, 8, NOT WS_GROUP
Expand Down

0 comments on commit ad611b4

Please sign in to comment.