From de3a47b6484510b047f407652c8799f0cedc32d6 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 23 Jan 2020 19:58:26 -0800 Subject: [PATCH] Use the pull request repo, branch and commit srb2win-jameds:appveyor-exename-b1d931d47.exe (cherry picked from commit ef2febe1e01bc7c93f30d2063bfd754b1a79dd3a) --- appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2211be32..4ed97ba8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -83,9 +83,12 @@ before_build: - ccache -V - ccache -s - if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" ) -- cmd: git rev-parse --short %APPVEYOR_REPO_COMMIT%>%TMP%/gitshort.txt +- if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" ) +- cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt - cmd: set /P GITSHORT=<%TMP%/gitshort.txt -- set "EXENAME=EXENAME=srb2win-%APPVEYOR_REPO_BRANCH%-%GITSHORT%.exe" +# for pull requests, take the owner's name only, if this isn't the same repo of course +- if [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( set "REPO=%APPVEYOR_REPO_BRANCH" ) else ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a:%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH" ) +- set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe" - set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%" - if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" ) - set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"