forked from Kerbalism/Kerbalism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 1.52 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
language: csharp
env:
global:
- ZIP_PASSWORD="gQn337XZBEFxzFuVwzKgc27ehZo7XLz485hh3erqF9"
matrix:
include:
- env:
- KSPVERS="1.6.1 1.5.1 1.4.5 1.3.1"
- KSPBINS="16 15 14 13"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq p7zip-full bash openssh-client jq
script:
- cd "$TRAVIS_BUILD_DIR"
- bash "$TRAVIS_BUILD_DIR/buildscripts/Travis/build.sh"
after_success:
- export MOD_VERSION=$(cat $TRAVIS_BUILD_DIR/GameData/Kerbalism/Kerbalism.version | jq '.VERSION.MAJOR').$(cat $TRAVIS_BUILD_DIR/GameData/Kerbalism/Kerbalism.version | jq '.VERSION.MINOR').$(cat $TRAVIS_BUILD_DIR/GameData/Kerbalism/Kerbalism.version | jq '.VERSION.PATCH')
- bash "$TRAVIS_BUILD_DIR/buildscripts/Travis/avc_version.sh" $PRIMARY_KSPVER "$TRAVIS_BUILD_DIR/GameData/Kerbalism/Kerbalism.version"
- 7za a "$TRAVIS_BUILD_DIR/Kerbalism-$MOD_VERSION-BUILD$TRAVIS_BUILD_NUMBER.zip" "$TRAVIS_BUILD_DIR/GameData"
- 7za a "$TRAVIS_BUILD_DIR/Kerbalism-$MOD_VERSION-BUILD$TRAVIS_BUILD_NUMBER.zip" "$TRAVIS_BUILD_DIR/LICENSE"
- 7za a "$TRAVIS_BUILD_DIR/Kerbalism-$MOD_VERSION-BUILD$TRAVIS_BUILD_NUMBER.zip" "$TRAVIS_BUILD_DIR/CHANGELOG.md"
- echo "${SFTP_KEY}" | base64 --decode >/tmp/sftp_key
- chmod 400 /tmp/sftp_key
- ssh-keyscan -p ${SFTP_PORT} -H ${SFTP_TARGET} >> ~/.ssh/known_hosts
- scp -i /tmp/sftp_key -P ${SFTP_PORT} "$TRAVIS_BUILD_DIR/Kerbalism-$MOD_VERSION-BUILD$TRAVIS_BUILD_NUMBER.zip" "${SFTP_USER}@${SFTP_TARGET}:${SFTP_DIR}/Kerbalism-$MOD_VERSION-BUILD$TRAVIS_BUILD_NUMBER.zip"
notifications:
email: false