Skip to content

Commit ce5fc37

Browse files
authored
Merge pull request #406 from apache/7-download-location
Use ASF download site for Grails 7+
2 parents 55904fd + b6438ae commit ce5fc37

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

buildSrc/src/main/groovy/org/grails/documentation/DownloadPage.groovy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ class DownloadPage {
4545
* Does not handle pre-release versions as these are not displayed in the select box.
4646
*/
4747
static String resolveOldDownloadUrl(String version) {
48-
def baseUrl = 'https://github.com/apache/grails-core/releases/download'
4948
def parts = ((version.split(/\./)*.replaceAll(/\D.*/, '')*.toInteger()) + [0, 0, 0]).take(3)
5049
def (major, minor, patch) = [parts[0], parts[1], parts[2]]
51-
def artifactName = "apache-grails-$version-bin"
5250
def tag = "v$version"
5351
if (major < 7) {
54-
artifactName = "grails-$version"
52+
def baseUrl = 'https://github.com/apache/grails-core/releases/download'
53+
def artifactName = "grails-$version"
5554
if (major == 6) {
5655
baseUrl = 'https://github.com/apache/grails-forge/releases/download'
5756
artifactName = "grails-cli-$version"
@@ -62,8 +61,11 @@ class DownloadPage {
6261
if (major <= 1 && patch == 0) {
6362
tag = "v$major.$minor"
6463
}
64+
return "$baseUrl/$tag/${artifactName}.zip"
65+
}
66+
else {
67+
return "https://www.apache.org/dyn/closer.lua/grails/core/$version/distribution/apache-grails-$version-bin.zip?action=download"
6568
}
66-
return "$baseUrl/$tag/${artifactName}.zip"
6769
}
6870

6971
@CompileDynamic

0 commit comments

Comments
 (0)