Skip to content

Commit

Permalink
Add deployment script for AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
xycaleth committed Mar 12, 2017
1 parent 701b05e commit 29cb7b6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
29 changes: 16 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ clone_folder: C:\projects\OpenJK

#scripts to run before build
before_build:
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: if "%Platform%"=="x64" set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64"
- cmd: echo "Generator='%CMAKE_GENERATOR%'"
- cmd: echo "Platform='%Platform%'"
- cmd: if exist build rmdir /q /s build #remove build dir
- cmd: mkdir build
- cmd: cd build
- cmd: cmake -DCMAKE_INSTALL_PREFIX=install -G "%CMAKE_GENERATOR%" "%APPVEYOR_BUILD_FOLDER%"
- cmd: ls
- cd %APPVEYOR_BUILD_FOLDER%
- if "%Platform%"=="x64" set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64"
- echo "Generator='%CMAKE_GENERATOR%'"
- echo "Platform='%Platform%'"
- if exist build rmdir /q /s build #remove build dir
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=install -G "%CMAKE_GENERATOR%" "%APPVEYOR_BUILD_FOLDER%"
- ls

build:
parallel: true
Expand All @@ -55,12 +55,15 @@ build:

#scripts to run after build
after_build:
- cmd: cmake --build . --target INSTALL
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: 7z a openjk-windows.zip %APPVEYOR_BUILD_FOLDER%/build/install/JediAcademy/*
- cmd: 7z l openjk-windows.zip # list files in the zip file
- cmake --build . --target INSTALL
- cd %APPVEYOR_BUILD_FOLDER%
- 7z a openjk-windows.zip %APPVEYOR_BUILD_FOLDER%/build/install/JediAcademy/*
- 7z l openjk-windows.zip # list files in the zip file

artifacts:
- path: openjk-windows.zip
name: OpenJK Jedi Academy ZIP
type: zip

deploy_script:
- tools/builds/deploy.bat
5 changes: 5 additions & 0 deletions tools/builds/deploy.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "%APPVEYOR_FORCED_BUILD%"
if "%APPVEYOR_FORCED_BUILD%"=="True" (
C:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P rsync
rsync -avz --progress -e 'ssh -p 29022 ' --protocol=29 openjk-windows*.zip ojkwinbuilder@upload.openjk.org:/home/ojkwinbuilder/builds/
)

0 comments on commit 29cb7b6

Please sign in to comment.