Skip to content

Commit d3a1883

Browse files
only load github plugin if file is there
(cherry picked from commit 46183f5)
1 parent 92e6f5f commit d3a1883

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,14 @@ githubRelease {
9191
tasks.githubRelease.dependsOn zipDist
9292

9393
static String getGithubKey(){
94-
Properties props = new Properties()
95-
props.load(new FileInputStream(new File('secrets.properties')))
96-
return props['GITHUB_TOKEN']
94+
if (new File('secrets.properties').exists()) {
95+
96+
Properties props = new Properties()
97+
props.load(new FileInputStream(new File('secrets.properties')))
98+
return props['GITHUB_TOKEN']
99+
}
100+
101+
return ""
97102
}
98103

99104
task depsize {

0 commit comments

Comments
 (0)