Added deploy script

This commit is contained in:
Norbi Peti 2017-06-28 17:20:15 +02:00
parent c939d1e752
commit aaa7e7b7ee
3 changed files with 22 additions and 1 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/target/
upload_key

View file

@ -10,4 +10,15 @@ before_install: | # Wget BuildTools and run if cached folder not found
language: java
jdk:
- oraclejdk8
sudo: true # Enable after each server update
sudo: true
deploy:
# deploy develop to the staging environment
- provider: script
script: deploy.sh staging
on:
branch: dev
# deploy master to production
- provider: script
script: deploy.sh production
on:
branch: master

9
deploy.sh Normal file
View file

@ -0,0 +1,9 @@
#!/bin/sh
FILENAME=$(find target/ ! -name '*original*' -name '*.jar')
echo Found file: $FILENAME
if [ $1 = 'production' ]; then
echo Production mode
echo $UPLOAD_KEY > upload_key
scp -i upload_key $FILENAME travis@server.figytuna.com:/minecraft/main/plugins
fi