forked from OpenSageTV/sagetv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin-uploader.gradle
executable file
·73 lines (65 loc) · 1.79 KB
/
plugin-uploader.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
61
62
63
64
65
66
67
68
69
70
71
72
/**
* NOTE: To use this uploader you should use the command
* ./gradlew -b plugin-uploader.gradle -Dstv.name=STVNAME bintrayUpload
*
* Before doing an upload, make sure you actually build the STV package
* cd build/pluginfiles/
* ant -Dstv.name=STVNAME
*
*/
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
// Note this the version the Plugins, not sagetv
version = '9.0'
// Globals
ext {
stv_name = System.getProperty("stv.name")
stv_version = version;
}
if (stv_name == null) {
throw new Exception("must pass -Dstv.name on the command line")
}
if (!file("build/pluginrelease/${stv_name}-${stv_version}.zip").exists()) {
throw new Exception("must run the build.xml in build/pluginfiles/ before uploading")
}
repositories {
mavenCentral()
jcenter()
}
// Upload tasks
// use ./gradlew bintrayUpload
// make sure your BINTRAY_API is set in the environment
//
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_API");
filesSpec {
// from 'build/release'
from ('build/pluginrelease') {
include "${stv_name}*"
}
into "sagetv-themes/${stv_version}"
}
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
repo = 'sagetv'
name = "sagev-themes"
userOrg = 'opensagetv'
desc = "SageTV Theme Release"
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/google/sagetv'
labels = ['sagetv','theme']
publicDownloadNumbers = true
version {
name = "${stv_version}"
released = new Date()
desc = "SageTV Themes ${stv_version}"
//vcsTag = "V${version}"
//attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
}
}
}
// This get run when you call ./gradlew without any targets
// defaultTasks 'sageJar'