add pushing of builds to OpenRCT2.org

This commit is contained in:
IntelOrca 2016-01-26 23:12:52 +00:00
parent c9042c6174
commit 818ff719c2
3 changed files with 37 additions and 3 deletions

View File

@ -5,10 +5,12 @@ environment:
secure: saYAIpqXzpq0U+JH+MNi/isRQ6Y51PZhm4BrnePDiAPptFO5htxFOLegrYqxdy67
CODE-SIGN-KEY-OPENRCT2.ORG.PFX.PASSWORD:
secure: bzYmf0ElxisSGyZnIjUOYQ==
OPENRCT2.ORG_TOKEN:
secure: leQX3xCQpmBLGuMqrxjFlzexDt96ypNRMM5TTRVHbGE8PwVg9crgeykLc2BIZU6HDHveJCHqh2cGMdHtHYJYcw==
install:
- nuget install secure-file -ExcludeVersion
- secure-file\tools\secure-file -decrypt distribution\windows\code-sign-key-openrct2.org.pfx.enc -secret %enckey%
- cinst nsis.portable -pre
- secure-file\tools\secure-file -decrypt distribution\windows\code-sign-key-openrct2.org.pfx.enc -secret %ENCKEY%
- cinst nsis.portable -pre > nul
- ps: >-
curl "http://nsis.sourceforge.net/mediawiki/images/5/53/KillProcDll%26FindProcDll.zip" -OutFile nsisxtra.zip

View File

@ -2,6 +2,22 @@
# Script to build OpenRCT2 on AppVeyor
#########################################################
function Push-Build($file, $name, $version, $flavourId)
{
curl.exe -s -o - `
--form "key=${env:OPENRCT2.ORG_TOKEN}" `
--form "fileName=$name" `
--form "version=$version" `
--form "gitHash=${env:APPVEYOR_REPO_COMMIT}" `
--form "gitBranch=${env:APPVEYOR_REPO_BRANCH}" `
--form "flavourId=$flavourId" `
--form "file=@$file" `
"https://openrct2.org/altapi/?command=push-build"
}
# Provide a short commit SHA1 too
${env:APPVEYOR_REPO_COMMIT_SHORT} = (${env:APPVEYOR_REPO_COMMIT}).Substring(0, 7)
# Install dependencies
install -Quiet
@ -30,3 +46,19 @@ publish package `
-BuildNumber $env:APPVEYOR_BUILD_NUMBER `
-GitBranch $env:APPVEYOR_REPO_BRANCH `
-CodeSign
$version = "0.0.4.0"
$pushFileName = "OpenRCT2-$version-windows-${env:APPVEYOR_REPO_COMMIT_SHORT}"
# Push portable zip
Write-Host "Sending portable zip to OpenRCT2.org" -ForegroundColor Cyan
Push-Build -file ".\artifacts\openrct2.zip" `
-name "$pushFileName.zip" `
-version $version `
-flavourId 1
Write-Host "Sending installer to OpenRCT2.org" -ForegroundColor Cyan
Push-Build -file ".\artifacts\openrct2-install.exe" `
-name "$pushFileName.exe" `
-version $version `
-flavourId 2

View File

@ -165,7 +165,7 @@ function Do-Installer()
if (-not (Sign-Binary($installerPath))) { return 1 }
}
Move-Item -Force $installerPath $artifactsDir
Move-Item -Force $installerPath "$artifactsDir\openrct2-install.exe"
return 0
}