File tree Expand file tree Collapse file tree 7 files changed +71
-13
lines changed
Expand file tree Collapse file tree 7 files changed +71
-13
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,18 @@ deploy:
4848 tags : true
4949
5050 - provider : script
51- script : ci/travis/nightly_deploy .sh
51+ script : ci/travis/ftp_deploy .sh
5252 on :
5353 condition : ' "$NIGHTLY_BUILD" == true'
5454 tags : true
5555
56+ - provider : script
57+ skip_cleanup : true
58+ script : bash ci/travis/ftp_deploy.sh
59+ on :
60+ condition : $TEST_BUILD = true
61+ all_branches : true
62+
5663matrix :
5764 include :
5865 # note that gcc Debug MUST be 1st for Coverity
Original file line number Diff line number Diff line change @@ -47,3 +47,15 @@ deploy:
4747 beta : true
4848 on :
4949 NightlyBuild : true # deploy on nightly push only
50+
51+ - provider : FTP
52+ protocol : ftp
53+ host : swc.fs2downloads.com
54+ username :
55+ secure : EXg2ADoKzMduZF90ip2Q0g==
56+ password :
57+ secure : x0LL0uY9yBAQ7JTARhQ6AA==
58+ folder : swc.fs2downloads.com/builds/test/$(VersionName)
59+ beta : true
60+ on :
61+ TestBuild : true # deploy on test build push only
Original file line number Diff line number Diff line change @@ -59,11 +59,12 @@ $BuildConfigurations = $null
5959# Default values
6060$ReleaseBuild = $false
6161$NightlyBuild = $false
62- $DeployBuild = $false
62+ $TestBuild = $false
6363
6464# Set to true to test either the release or the nightly part of this script
6565$ReleaseTest = $false
6666$NightlyTest = $false
67+ $TestBuildTest = $false
6768
6869if ($ReleaseTest -Or ([System.Convert ]::ToBoolean($env: APPVEYOR_REPO_TAG ) -And (" $env: APPVEYOR_REPO_TAG_NAME " -match " ^release_(.*)" ))) {
6970 # Tag matches
@@ -80,19 +81,31 @@ if ($NightlyTest -Or ([System.Convert]::ToBoolean($env:APPVEYOR_REPO_TAG) -And (
8081 $BuildConfigurations = $NightlyConfigurations
8182}
8283
84+ if ($TestBuildTest -Or ([System.Convert ]::ToInt32($env: APPVEYOR_PULL_REQUEST_NUMBER ) -le 0 -And (" $env: APPVEYOR_REPO_BRANCH " -match " ^test\/(.*)" ))) {
85+ # Tag matches
86+ $TestBuild = $true
87+ $PackageName = " test_$ ( $matches [1 ]) "
88+ Set-AppveyorBuildVariable ' VersionName' " $ ( $matches [1 ]) "
89+ $BuildConfigurations = $NightlyConfigurations
90+
91+ # Override the revision string so that the builds are named correctly
92+ [System.IO.File ]::WriteAllLines(" $env: APPVEYOR_BUILD_FOLDER /version_override.cmake" , " set(FSO_VERSION_REVISION_STR $env: VersionName )" )
93+ }
94+
8395# Multiply by 2 so that we can add 0 or 1 for debug or release Configs
8496$buildID = [convert ]::ToInt32($env: BuildID ) * 2
8597if ($Env: Configuration -eq " Release" ) {
8698 $buildID = $buildID + 1
8799}
88- Write-Host " $buildID "
89100
90- if ($ReleaseBuild -Or $NightlyBuild ) {
101+ $DeployBuild = $false
102+ if ($ReleaseBuild -Or $NightlyBuild -Or $TestBuild ) {
91103 $DeployBuild = $true
92104}
93105
94106Set-AppveyorBuildVariable ' ReleaseBuild' " $ReleaseBuild "
95107Set-AppveyorBuildVariable ' NightlyBuild' " $NightlyBuild "
108+ Set-AppveyorBuildVariable ' TestBuild' " $TestBuild "
96109
97110New-Item build - type directory
98111Set-Location - Path build
Original file line number Diff line number Diff line change 11
2- if ([System.Convert ]::ToBoolean($env: ReleaseBuild ) -Or [System.Convert ]::ToBoolean($env: NightlyBuild )) {
2+ if ([System.Convert ]::ToBoolean($env: ReleaseBuild ) -Or [System.Convert ]::ToBoolean($env: NightlyBuild ) -Or [ System.Convert ]::ToBoolean( $ env: TestBuild ) ) {
33 # Skip tests for deployment
44 exit 0
55} else {
Original file line number Diff line number Diff line change 22
33RELEASE_BUILD=false
44NIGHTLY_BUILD=false
5+ TEST_BUILD=false
6+
57BUILD_DEPLOYMENT=false
68BUILD_CONFIGS=" Release FastDebug"
79VERSION_NAME=" "
810PACKAGE_NAME=" "
911
1012RELEASE_PATTERN=" ^release_(.*)$"
1113NIGHTLY_PATTERN=" ^nightly_(.*)$"
14+ TEST_BUILD_PATTERN=" ^test\/(.*)$"
1215
1316# These are for testing
1417NIGHTLY_TEST=false
1518RELEASE_TEST=false
19+ TEST_BUILD_TEST=false
1620
1721if [ " $RELEASE_TEST " = true ] || [[ " $TRAVIS_TAG " =~ $RELEASE_PATTERN ]]; then
1822 echo " This is a release tag!" ;
@@ -25,8 +29,22 @@ if [ "$NIGHTLY_TEST" = true ] || [[ "$TRAVIS_TAG" =~ $NIGHTLY_PATTERN ]]; then
2529 VERSION_NAME=" ${BASH_REMATCH[1]} " ;
2630 PACKAGE_NAME=" nightly_${BASH_REMATCH[1]} " ;
2731fi
32+ if [ " $TEST_BUILD_TEST " = true ] || [[ " $TRAVIS_PULL_REQUEST " == " false" && " $TRAVIS_BRANCH " =~ $TEST_BUILD_PATTERN ]]; then
33+ echo " This is a test build branch!" ;
34+ TEST_BUILD=true;
35+ if [ " $TEST_BUILD_TEST " = true ]; then
36+ VERSION_NAME=" test" ;
37+ PACKAGE_NAME=" test_test" ;
38+ else
39+ VERSION_NAME=" ${BASH_REMATCH[1]} " ;
40+ PACKAGE_NAME=" test_${BASH_REMATCH[1]} " ;
41+ fi
42+
43+ # Override the revision string so that the builds are named correctly
44+ echo " set(FSO_VERSION_REVISION_STR $VERSION_NAME )" > " $TRAVIS_BUILD_DIR /version_override.cmake"
45+ fi
2846
29- if ([ " $RELEASE_BUILD " = true ] || [ " $NIGHTLY_BUILD " = true ]); then
47+ if ([ " $RELEASE_BUILD " = true ] || [ " $NIGHTLY_BUILD " = true ] || [ " $TEST_BUILD " = true ] ); then
3048 BUILD_DEPLOYMENT=true;
3149fi
3250
4462
4563export RELEASE_BUILD
4664export NIGHTLY_BUILD
65+ export TEST_BUILD
4766export BUILD_DEPLOYMENT
4867export BUILD_CONFIGS
4968export VERSION_NAME
Original file line number Diff line number Diff line change 4141cd /tmp/builds
4242
4343for file in * ; do
44- # Upload to indiegames
45- curl -k " sftp://scp.indiegames.us/~/public_html/builds/nightly/$VERSION_NAME /" --user " $INDIEGAMES_USER :$INDIEGAMES_PASSWORD " -T " $file " --ftp-create-dirs
46-
47- # Upload to fs2downloads
48- curl -k " ftp://swc.fs2downloads.com/swc.fs2downloads.com/builds/nightly/$VERSION_NAME /" --user " $FS2DOWNLOADS_USER :$FS2DOWNLOADS_PASSWORD " -T " $file " --ftp-create-dirs
44+ if [ " $TEST_BUILD " = true ]; then
45+ # Upload to fs2downloads
46+ curl -k " ftp://swc.fs2downloads.com/swc.fs2downloads.com/builds/test/$VERSION_NAME /" --user " $FS2DOWNLOADS_USER :$FS2DOWNLOADS_PASSWORD " -T " $file " --ftp-create-dirs
47+ else
48+ # Upload to indiegames
49+ curl -k " sftp://scp.indiegames.us/~/public_html/builds/nightly/$VERSION_NAME /" --user " $INDIEGAMES_USER :$INDIEGAMES_PASSWORD " -T " $file " --ftp-create-dirs
50+
51+ # Upload to fs2downloads
52+ curl -k " ftp://swc.fs2downloads.com/swc.fs2downloads.com/builds/nightly/$VERSION_NAME /" --user " $FS2DOWNLOADS_USER :$FS2DOWNLOADS_PASSWORD " -T " $file " --ftp-create-dirs
53+ fi
4954done
Original file line number Diff line number Diff line change 44mkdir -p /tmp/builds
55
66if [ " $TRAVIS_OS_NAME " = " linux" ]; then
7- PARENT_DIR=" $( basename $PWD ) "
8- (cd .. && tar cvf /tmp/builds/$PACKAGE_NAME -source-Unix.tar.gz --exclude-vcs " $PARENT_DIR " )
7+ if [ " $RELEASE_BUILD " = true ]; then
8+ PARENT_DIR=" $( basename $PWD ) "
9+ (cd .. && tar cvf /tmp/builds/$PACKAGE_NAME -source-Unix.tar.gz --exclude-vcs " $PARENT_DIR " )
10+ fi
911
1012 cd build
1113 for config in $BUILD_CONFIGS
You can’t perform that action at this time.
0 commit comments