mirror of
https://github.com/TotalFreedomMC/TotalFreedomMod.git
synced 2024-11-18 17:30:02 +00:00
Set up Travis CI automatic build uploads to SFTP server.
This commit is contained in:
parent
b55ca70056
commit
089fc0670d
2 changed files with 20 additions and 0 deletions
|
@ -3,3 +3,10 @@ jdk:
|
|||
- oraclejdk8
|
||||
notifications:
|
||||
email: false
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- sshpass
|
||||
script: mvn clean install
|
||||
after_success:
|
||||
- ./travis-upload.sh
|
||||
|
|
13
travis-upload.sh
Executable file
13
travis-upload.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
||||
mv target/TotalFreedomMod.jar target/TotalFreedomMod-${TRAVIS_COMMIT}.jar
|
||||
export SSHPASS=${SFTP_PASSWORD}
|
||||
sshpass -e sftp -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oLogLevel=ERROR -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST}:${SFTP_PATH} << !
|
||||
put target/TotalFreedomMod-${TRAVIS_COMMIT}.jar
|
||||
bye
|
||||
!
|
||||
echo "Artifact upload status: "$?
|
||||
else
|
||||
echo "Skipping artifact upload for pull request build."
|
||||
fi
|
Loading…
Reference in a new issue