add script for build and script for deploy on raspberry

This commit is contained in:
MaximZaitsev
2016-07-29 13:17:40 +03:00
parent 4996c0be51
commit bba90d680d
2 changed files with 37 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
./gradlew build
cd build/js
npm install
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/expect
#todo make as script params
set host "voltus.ru"
set userName "failiki"
set password "qwerQWERqwer"
spawn ./gradlew build
expect eof
spawn scp -r ./build/js/main.js ./build/js/kotlin.js ./build/js/package.json ./build/js/proto/ $userName@$host:./server/
expect "password:"
send "$password\r"
expect eof
spawn ssh $userName@$host
expect "password:"
send "$password\r"
expect "%"
send "killall -9 node"
expect "%"
send "cd server \r"
expect "%"
send "npm install \r"
expect "%"
send "node main.js &\r"
expect "%"
send "exit\r"
expect eof