Skip to content

Commit

Permalink
Merge pull request #114 from m-tmatma/feature/zip-artifacts
Browse files Browse the repository at this point in the history
appveyor の成果物の zip 圧縮する
  • Loading branch information
kobake authored Jun 14, 2018
2 parents c14829c + 307273a commit c94f015
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ build_script:
echo %MSBUILD_EXE% %SLN_FILE% /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /t:"Clean","Rebuild" %EXTRA_CMD%
%MSBUILD_EXE% %SLN_FILE% /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /t:"Clean","Rebuild" %EXTRA_CMD%
call zipArtifacts.bat %PLATFORM% %CONFIGURATION%
echo appveyor_yml
artifacts:
- path: '$(platform)\$(configuration)\*.exe'
- path: '$(platform)\$(configuration)\*.dll'
- path: '$(platform)\$(configuration)\*.pdb'
- path: 'sakura-$(platform)-$(configuration).zip'
24 changes: 24 additions & 0 deletions zipArtifacts.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
set platform=%1
set configuration=%2
set WORKDIR=sakura-%platform%-%configuration%
set OUTFILE=sakura-%platform%-%configuration%.zip

@rem cleanup for local testing
if exist "%OUTFILE%" (
del %OUTFILE%
)
if exist "%WORKDIR%" (
rmdir /s /q %WORKDIR%
)

mkdir %WORKDIR%
copy %platform%\%configuration%\*.exe %WORKDIR%\
copy %platform%\%configuration%\*.dll %WORKDIR%\
copy %platform%\%configuration%\*.pdb %WORKDIR%\

7z a %OUTFILE% -r %WORKDIR%
7z l %OUTFILE%

if exist %WORKDIR% (
rmdir /s /q %WORKDIR%
)

0 comments on commit c94f015

Please sign in to comment.