Skip to content

Commit

Permalink
Travis SFTP uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
steamport committed Jul 26, 2018
1 parent c9ab138 commit b3aa91c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ matrix:
- EXTRA="/p:DefineConstants=KSP13"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq p7zip-full bash
- sudo apt-get install -qq p7zip-full bash openssh-client
before_script:
- echo "Downloading DLLs for KSP $KSPVER."
- wget https://img.spaceball.cf/KSP-$KSPVER.7z
Expand All @@ -20,6 +20,10 @@ script:
- msbuild $EXTRA Kerbalism.sln /t:Build /p:Configuration=Release
after_success:
- /bin/cp -rf $TRAVIS_BUILD_DIR/src/obj/Release/Kerbalism.dll $TRAVIS_BUILD_DIR/GameData/Kerbalism/Kerbalism.dll
# TODO: Artifact uploading
- 7za a "$TRAVIS_BUILD_DIR/Kerbalism-$KSPVER-BUILD$TRAVIS_BUILD_NUMBER.zip" "$TRAVIS_BUILD_DIR/GameData"
- 7za a "$TRAVIS_BUILD_DIR/Kerbalism-$KSPVER-BUILD$TRAVIS_BUILD_NUMBER.zip" "$TRAVIS_BUILD_DIR/LICENSE"
- 7za a "$TRAVIS_BUILD_DIR/Kerbalism-$KSPVER-BUILD$TRAVIS_BUILD_NUMBER.zip" "$TRAVIS_BUILD_DIR/CHANGELOG.md"
- echo "${SFTP_KEY}" | base64 --decode >/tmp/sftp_key
- sftp -i /tmp/sftp_key "${SFTP_USER}@${SFTP_TARGET}:/var/www/builds" <<< $'put "$TRAVIS_BUILD_DIR/Kerbalism-$KSPVER-BUILD$TRAVIS_BUILD_NUMBER.zip"'
notifications:
email: false
2 changes: 1 addition & 1 deletion src/Kerbalism.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
if $(ConfigurationName)==Release (call "$(ProjectDir)..\buildscripts\ZipPack\build-package.bat" $(TargetName) -v@(VersionNumber) KSP1.4.4)</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>if "$(ConfigurationName)"=="Debug" (call "$(ProjectDir)..\buildscripts\UnityDebug\prepare-debug.bat" $(TargetName))
<PostBuildEvent Condition="'$(OS)' == 'Windows_NT'">if "$(ConfigurationName)"=="Debug" (call "$(ProjectDir)..\buildscripts\UnityDebug\prepare-debug.bat" $(TargetName))
if "$(ConfigurationName)"=="Release" (call "$(ProjectDir)..\buildscripts\ZipPack\build-package.bat" $(TargetName) -v@(VersionNumber) KSP1.4.4)
if "$(ConfigurationName)"=="Debug 1.3" (call "$(ProjectDir)..\buildscripts\UnityDebug\prepare-debug.bat" $(TargetName))
if "$(ConfigurationName)"=="Release 1.3" (call "$(ProjectDir)..\buildscripts\ZipPack\build-package.bat" $(TargetName) -v@(VersionNumber) KSP1.3.1)</PostBuildEvent>
Expand Down

0 comments on commit b3aa91c

Please sign in to comment.