Skip to content

Commit

Permalink
Merge pull request sakura-editor#1186 from m-tmatma/feature/issue821-…
Browse files Browse the repository at this point in the history
…fixup-appveyor-variable-refactoring-and-log

ログの整形、変数の定義位置の移動 (sakura-editor#1183 を分割してレビューしやすくする)
  • Loading branch information
m-tmatma authored Feb 9, 2020
2 parents 8e01ef9 + 2a18c7a commit 16c6e34
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions sakura/githash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ exit /b 0
set GITHUB_PR_HEAD_COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%
)

if not "%GITHUB_PR_HEAD_COMMIT%" == "" (
set GITHUB_PR_HEAD_SHORT_COMMIT=%GITHUB_PR_HEAD_COMMIT:~0,8%
) else (
set GITHUB_PR_HEAD_SHORT_COMMIT=
)

if "%BUILD_REPOSITORY_PROVIDER%"=="GitHub" (
set GITHUB_ON=1
)
Expand All @@ -118,12 +124,6 @@ exit /b 0
set "GITHUB_COMMIT_URL_PR_HEAD=%PREFIX_GITHUB%/%CI_REPO_NAME%/pull/%GITHUB_PR_NUMBER%/commits/%GITHUB_PR_HEAD_COMMIT%"
)
)

if not "%GITHUB_PR_HEAD_COMMIT%" == "" (
set GITHUB_PR_HEAD_SHORT_COMMIT=%GITHUB_PR_HEAD_COMMIT:~0,8%
) else (
set GITHUB_PR_HEAD_SHORT_COMMIT=
)
exit /b 0

:set_ci_build_url
Expand Down Expand Up @@ -172,17 +172,20 @@ exit /b 0
@echo TEMP_GIT_COMMIT_HASH : %TEMP_GIT_COMMIT_HASH%
@echo GIT_REMOTE_ORIGIN_URL : %GIT_REMOTE_ORIGIN_URL%
@echo GIT_TAG_NAME : %GIT_TAG_NAME%
@echo APPVEYOR_URL : %APPVEYOR_URL%
@echo.
@echo CI_REPO_NAME : %CI_REPO_NAME%
@echo CI_ACCOUNT_NAME : %CI_ACCOUNT_NAME%
@echo APPVEYOR_PROJECT_SLUG : %APPVEYOR_PROJECT_SLUG%
@echo CI_BUILD_VERSION : %CI_BUILD_VERSION%
@echo CI_BUILD_NUMBER : %CI_BUILD_NUMBER%
@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_COMMIT : %GITHUB_PR_HEAD_COMMIT%
@echo GITHUB_PR_HEAD_SHORT_COMMIT : %GITHUB_PR_HEAD_SHORT_COMMIT%
@echo CI_BUILD_URL : %CI_BUILD_URL%
@echo.
@echo APPVEYOR_URL : %APPVEYOR_URL%
@echo APPVEYOR_PROJECT_SLUG : %APPVEYOR_PROJECT_SLUG%

if exist "%GITHASH_H%" del "%GITHASH_H%"
move /y "%GITHASH_H_TMP%" "%GITHASH_H%"
Expand Down Expand Up @@ -227,12 +230,6 @@ exit /b 0
echo #define GIT_TAG_NAME "%GIT_TAG_NAME%"
)

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

if "%CI_REPO_NAME%" == "" (
echo // CI_REPO_NAME is not defined
) else (
Expand All @@ -248,12 +245,6 @@ exit /b 0
echo #define CI_ACCOUNT_NAME "%CI_ACCOUNT_NAME%"
)

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

if "%CI_BUILD_VERSION%" == "" (
echo // CI_BUILD_VERSION is not defined
) else (
Expand Down Expand Up @@ -310,4 +301,20 @@ exit /b 0
echo #define CI_BUILD_URL "%CI_BUILD_URL%"
)

echo // APPVEYOR specific variables

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

if "%APPVEYOR_PROJECT_SLUG%" == "" (
echo // APPVEYOR_PROJECT_SLUG is not defined
) else (
echo #define APPVEYOR_PROJECT_SLUG "%APPVEYOR_PROJECT_SLUG%"
)
echo // APPVEYOR specific variables end
echo //

exit /b 0

0 comments on commit 16c6e34

Please sign in to comment.