Skip to content

Commit 54ee5db

Browse files
Merge branch 'master' into 1.21.4
2 parents 63ea9ef + b814ae6 commit 54ee5db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ import org.kohsuke.github.GitHub
206206

207207
task github(dependsOn: build) {
208208
def repoIdProvider = providers.gradleProperty("mcx_repo_id")
209+
def ghVersion = getGhVersion()
209210

210211
onlyIf {
211212
ENV.GITHUB_TOKEN
@@ -215,7 +216,6 @@ task github(dependsOn: build) {
215216
def github = GitHub.connectUsingOAuth(ENV.GITHUB_TOKEN as String)
216217
def repoId = repoIdProvider.get()
217218
def repository = github.getRepository(repoId)
218-
def ghVersion = getGhVersion()
219219

220220
def ghRelease = repository.getReleaseByTagName(ghVersion as String)
221221
if(ghRelease == null) {
@@ -239,6 +239,7 @@ task closeMilestone {
239239
def minecraftVersionProvider = providers.gradleProperty("minecraft_version")
240240
def modLoaderProvider = providers.gradleProperty("mod_loader")
241241
def archivesBaseNameProvider = providers.gradleProperty("archives_base_name")
242+
def ghVersion = getGhVersion()
242243

243244
onlyIf {
244245
ENV.GITHUB_TOKEN
@@ -248,7 +249,6 @@ task closeMilestone {
248249
def github = GitHub.connectUsingOAuth(ENV.GITHUB_TOKEN as String)
249250
def repoId = repoIdProvider.get()
250251
def repository = github.getRepository(repoId)
251-
def ghVersion = getGhVersion()
252252

253253
// Weird API design: listMilestones() requires GHIssueState while everything else uses GHMilestoneState.
254254
def milestone = repository.listMilestones(GHIssueState.ALL).find { it.title == ghVersion }
@@ -267,13 +267,13 @@ task closeMilestone {
267267

268268
task uploadBackups {
269269
dependsOn build
270+
def shortVersion = getGhVersion().substring(1)
270271

271272
onlyIf {
272273
ENV.WI_BACKUPS_API_KEY
273274
}
274275

275276
doLast {
276-
def shortVersion = getGhVersion().substring(1)
277277
def backupUrl = "https://api.wurstclient.net/artifact-backups/Wurst/${shortVersion}"
278278

279279
def maxRetries = 3

0 commit comments

Comments
 (0)