This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit d73ad881f920894ccdd8cb757b96e34fb03e5d9a
Author: Xycaleth <a...@acslo.com>
Date:   Thu Jun 22 23:24:15 2017 +0100

    Get Appveyor build/deployment scripts working
---
 appveyor.yml              | 20 ++++++++------------
 scripts/builds/deploy.bat | 20 ++++++++++++++++----
 2 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 814f8a1..5d25113 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -27,13 +27,14 @@ configuration:
   - Debug
   - Release
 
-#scripts that are called at very beginning, before repo cloning
 init:
-  - ps: Update-AppveyorBuild -Version 
"1.0-git-$($env:appveyor_repo_commit.substring(0,8))"
+  - ps: $env:SHORT_COMMIT_HASH=$env:appveyor_repo_commit.substring(0,8)
+  - ps: Update-AppveyorBuild -Version "1.0-git-$env:SHORT_COMMIT_HASH"
+  - ps: $env:ARTIFACT_FILE="openjk-$(Get-Date -UFormat 
"%Y-%m-%d")-$env:SHORT_COMMIT_HASH-windows.zip"
+  - echo "Artifact file='%ARTIFACT_FILE%'"
   - cmake --version
   - msbuild /version
 
-#where to clone the git repository to
 clone_folder: C:\projects\OpenJK
 
 #scripts to run before build
@@ -53,26 +54,21 @@ build:
   project: C:\projects\OpenJK\build\OpenJK.sln
   verbosity: normal
 
-#scripts to run after build
 after_build:
   - 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
+  - 7z a %ARTIFACT_FILE% %APPVEYOR_BUILD_FOLDER%/build/install/JediAcademy/*
+  - 7z l %ARTIFACT_FILE% # list files in the zip file
 
 artifacts:
-  - path: openjk-windows.zip
+  - path: openjk-*-windows.zip
     name: OpenJK Jedi Academy ZIP
     type: zip
 
-#on_finish:
-#  - ps: $blockRdp = $true; iex ((new-object 
net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
-
 deploy_script:
   - ps: $key = $env:DeploymentKey
   - ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----" + "`n"
   - ps: for ($i = 0; $i -lt $key.Length / 64; $i++) { $min = [math]::min(64, 
$key.Length - ($i * 64)); $fileContent += $key.substring($i*64, $min) + "`n"; }
   - ps: $fileContent += "-----END RSA PRIVATE KEY-----" + "`n"
   - ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
-  - ps: $blockRdp = $true; iex ((new-object 
net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
-  - scripts/builds/deploy.bat
+  - scripts/builds/deploy.bat %ARTIFACT_FILE%
diff --git a/scripts/builds/deploy.bat b/scripts/builds/deploy.bat
index 676d77c..71f44b2 100644
--- a/scripts/builds/deploy.bat
+++ b/scripts/builds/deploy.bat
@@ -1,8 +1,20 @@
 setlocal
 set CYGWIN_ROOT=C:\cygwin
+set WIN32_ROOT=/cygdrive/c
 set DEPLOY_LOCATION=ojkwinbuil...@upload.openjk.org:/home/ojkwinbuilder/builds/
+set ZIP_FILE=%1
+
+echo Scheduled build: %APPVEYOR_SCHEDULED_BUILD%
+echo Platform: %PLATFORM%
+echo Configuration: %CONFIGURATION%
+
+if not "%APPVEYOR_SCHEDULED_BUILD%"=="True" goto end
+if not "%PLATFORM%"=="Win32" goto end
+if not "%CONFIGURATION%"=="Release" goto end
+
+echo Deploying %ZIP_FILE%
+%CYGWIN_ROOT%\setup-x86.exe -qnNdO -R %CYGWIN_ROOT% -s 
http://cygwin.mirror.constant.com -l %CYGWIN_ROOT%/var/cache/setup -P rsync
+%CYGWIN_ROOT%\bin\bash -lc 'rsync -avz --progress -e "ssh -p 29022 -o 
StrictHostKeyChecking=no -i %WIN32_ROOT%/users/appveyor/.ssh/id_rsa" -p 
--chmod=0644 --protocol=29 %WIN32_ROOT%/projects/openjk/%ZIP_FILE% 
"%DEPLOY_LOCATION%"'
+
+end:
 
-if "%APPVEYOR_FORCED_BUILD%"=="True" (
-       %CYGWIN_ROOT%\setup-x86.exe -qnNdO -R %CYGWIN_ROOT% -s 
http://cygwin.mirror.constant.com -l %CYGWIN_ROOT%/var/cache/setup -P rsync
-       %CYGWIN_ROOT%\bin\bash -lc 'rsync -avz --progress -e "ssh -p 29022" 
--protocol=29 openjk-windows*.zip "%DEPLOY_LOCATION%"'
-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/openjk.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to