-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
60 lines (53 loc) · 1.29 KB
/
build.gradle
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
plugins {
id 'java'
id 'org.hidetake.ssh' version '1.1.4'
id 'eclipse'
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'lib', include: ['*.jar'])
testCompile 'junit:junit:4.12'
}
jar {
manifest {
attributes 'Main-Class': 'org.wikivoyage.listings.Main'
}
}
task distZip(type: Zip) {
from jar.outputs.files
from('lib/') {
include '**/*.jar'
into('lib')
}
from('config/') {
include '**/*.*'
into('config')
}
from('.') {
include 'wikivoyage-listings.sh'
into('.')
}
}
remotes {
webServer {
host = '78.47.36.1'
user = 'alexey'
identity = file('/home/alexey/.ssh/id_rsa')
knownHosts = allowAnyHosts
}
}
task deploy << {
ssh.run {
session(remotes.webServer) {
execute 'rm -f wikivoyage-listings.zip'
execute 'rm -rf wikivoyage-listings'
put 'build/distributions/wikivoyage-listings.zip', 'wikivoyage-listings.zip'
execute 'mkdir wikivoyage-listings'
execute 'cd wikivoyage-listings && unzip ../wikivoyage-listings.zip'
execute 'cp wikivoyage-listings.zip /var/www/wvpoi.batalex.ru/tool/wikivoyage-listings.zip'
}
}
}
deploy.dependsOn distZip