diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000000..ec43120f5d9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,9 @@ +version: '{build}' +skip_branch_with_pr: true +shallow_clone: true +build_script: + - ps: ./tools/appveyor/build.ps1 + - ps: "$deployPath = $env:APPVEYOR_BUILD_FOLDER + '/deploy'; bash ./tools/appveyor/deploy.sh $deployPath" + - ps: "[System.IO.Compression.ZipFile]::CreateFromDirectory($env:APPVEYOR_BUILD_FOLDER + '/deploy', $env:APPVEYOR_BUILD_FOLDER + '/deploy.zip')" +artifacts: + - path: deploy.zip \ No newline at end of file diff --git a/tools/appveyor/build.ps1 b/tools/appveyor/build.ps1 new file mode 100644 index 00000000000..3aea5f405c3 --- /dev/null +++ b/tools/appveyor/build.ps1 @@ -0,0 +1,12 @@ +$BYOND_MAJOR=512 +$BYOND_MINOR=1427 +if(!(Test-Path -Path "C:/byond")){ + Invoke-WebRequest "http://www.byond.com/download/build/$BYOND_MAJOR/$BYOND_MAJOR.${BYOND_MINOR}_byond.zip" -o C:/byond.zip + [System.IO.Compression.ZipFile]::ExtractToDirectory("C:/byond.zip", "C:/") + Remove-Item C:/byond.zip +} + + Set-Location $env:APPVEYOR_BUILD_FOLDER + + &"C:/byond/bin/dm.exe" -max_errors 0 paradise.dme +exit $LASTEXITCODE \ No newline at end of file diff --git a/tools/appveyor/deploy.sh b/tools/appveyor/deploy.sh new file mode 100644 index 00000000000..8e386252771 --- /dev/null +++ b/tools/appveyor/deploy.sh @@ -0,0 +1,21 @@ +#First arg is path to where you want to deploy +#creates a work tree free of everything except what's necessary to run the game + + mkdir -p \ + $1/_maps \ + $1/config \ + $1/goon \ + $1/strings \ + + if [ -d ".git" ]; then + # Control will enter here if $DIRECTORY exists. + mkdir -p $1/.git/logs + cp -r .git/logs/* $1/.git/logs/ +fi + + cp paradise.dmb paradise.rsc rust_g.dll $1/ +cp -r _maps/* $1/_maps/ +cp -r config/* $1/config/ +cp -r goon/* $1/goon/ +cp -r config/example/* $1/config/ +cp -r strings/* $1/strings/ \ No newline at end of file