Added deploy script
This commit is contained in:
parent
c939d1e752
commit
aaa7e7b7ee
3 changed files with 22 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
/target/
|
/target/
|
||||||
|
upload_key
|
||||||
|
|
13
.travis.yml
13
.travis.yml
|
@ -10,4 +10,15 @@ before_install: | # Wget BuildTools and run if cached folder not found
|
||||||
language: java
|
language: java
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk8
|
- 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
9
deploy.sh
Normal 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
|
Loading…
Reference in a new issue