-
Notifications
You must be signed in to change notification settings - Fork 12
/
capella.groovy
47 lines (34 loc) · 1.3 KB
/
capella.groovy
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
def getDownloadURL(branch = "master", platform = "win", proxy = ""){
def url = "https://download.eclipse.org/capella/core/products/nightly/${branch}/"
def script = proxy.isEmpty() ? "curl -ks ${url}" : "curl -ks -x ${proxy} ${url}"
def html = sh(script: "${script}", returnStdout: true)
def regex = ""
switch(platform){
case ~/mac/:
regex = /(capella-[\d.]*-macosx-cocoa-x86.*zip)'/
break
case ~/linux/:
regex = /(capella-[\d.]*-linux-gtk-x86.*zip)'/
break
case ~/win/:
regex = /(capella-[\d.]*-win32-win32-x86.*zip)'/
break
default:
regex = /(capella-[\d.]*-win32-win32-x86.*zip)'/
break
}
def zipName = (html =~ regex)[0][1]
return url + zipName
}
def getUpdateSiteURL(branch = "master") {
return "https://download.eclipse.org/capella/core/updates/nightly/${branch}/"
}
def getTestUpdateSiteURL(branch = "master") {
return getUpdateSiteURL(branch) + "org.polarsys.capella.test.site/"
}
def getRCPUpdateSiteURL(branch = "master") {
return getUpdateSiteURL(branch) + "org.polarsys.capella.rcp.site/"
}
def getEGFUpdateSiteURL(branch = "master") {
return getUpdateSiteURL(branch) + "org.polarsys.capella.egf.site/"
}