Skip to content

Commit

Permalink
GIT_SHORT_COMMIT_HASH と GIT_COMMIT_HASH の定義順を合わせる
Browse files Browse the repository at this point in the history
  • Loading branch information
m-tmatma committed Oct 26, 2018
1 parent c1f3433 commit d4779a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions appveyor.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@

| 生成する環境変数 | 説明 | 有効性 |
----|----|----
| GIT_COMMIT_HASH | git の commit Hash | git 環境が有効な場合 |
| GIT_SHORT_COMMIT_HASH | git の commit Hash の先頭8文字 | git 環境が有効な場合 |
| GIT_COMMIT_HASH | git の commit Hash | git 環境が有効な場合 |
| GIT_URL | git remote URL (origin) | git 環境が有効な場合 |
| GITHUB_COMMIT_URL | gitHub で対応する commit に対する URL | appveyor でのビルドのみ有効 |
| GITHUB_COMMIT_URL_PR_HEAD | gitHub の Pull Request の commit に対応する URL | appveyor での PR のビルドのみ有効 |
Expand All @@ -151,8 +151,8 @@

| 生成するマクロ名 | 元にする環境変数 ||
| ---- | ---- | ---- |
| GIT_COMMIT_HASH | GIT_COMMIT_HASH | 文字列 |
| GIT_SHORT_COMMIT_HASH | GIT_SHORT_COMMIT_HASH | 文字列 |
| GIT_COMMIT_HASH | GIT_COMMIT_HASH | 文字列 |
| GIT_URL | GIT_URL | 文字列 |
| APPVEYOR_URL | APPVEYOR_URL | 文字列 |
| APPVEYOR_REPO_NAME | APPVEYOR_REPO_NAME | 文字列 |
Expand Down
16 changes: 8 additions & 8 deletions sakura/githash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ if not exist ..\.git (

: Get git hash if git is enabled
if "%GIT_ENABLED%" == "1" (
for /f "usebackq" %%s in (`git show -s --format^=%%H`) do (
set GIT_COMMIT_HASH=%%s
)
for /f "usebackq" %%s in (`git show -s --format^=%%h`) do (
set GIT_SHORT_COMMIT_HASH=%%s
)
for /f "usebackq" %%s in (`git show -s --format^=%%H`) do (
set GIT_COMMIT_HASH=%%s
)
for /f "usebackq" %%s in (`git config --get remote.origin.url`) do (
set GIT_URL=%%s
)
Expand Down Expand Up @@ -135,16 +135,16 @@ exit /b 0
:output_githash
echo /*! @file */
echo #pragma once
if "%GIT_COMMIT_HASH%" == "" (
echo // GIT_COMMIT_HASH is not defined
) else (
echo #define GIT_COMMIT_HASH "%GIT_COMMIT_HASH%"
)
if "%GIT_SHORT_COMMIT_HASH%" == "" (
echo // GIT_SHORT_COMMIT_HASH is not defined
) else (
echo #define GIT_SHORT_COMMIT_HASH "%GIT_SHORT_COMMIT_HASH%"
)
if "%GIT_COMMIT_HASH%" == "" (
echo // GIT_COMMIT_HASH is not defined
) else (
echo #define GIT_COMMIT_HASH "%GIT_COMMIT_HASH%"
)
if "%GIT_URL%" == "" (
echo // GIT_URL is not defined
) else (
Expand Down

0 comments on commit d4779a9

Please sign in to comment.