From 3b2484f6314de33e5ec6ad6e69ed663fa63737ec Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 10 Jul 2015 15:23:49 +0100 Subject: [PATCH] Add bom finder to download widget --- _includes/build.gradle | 2 +- _includes/custom.js | 13 +++++++++++++ _includes/pom.xml | 2 +- index.html | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 _includes/custom.js diff --git a/_includes/build.gradle b/_includes/build.gradle index 74c79ad4..6b056be8 100644 --- a/_includes/build.gradle +++ b/_includes/build.gradle @@ -8,7 +8,7 @@ apply plugin: "io.spring.dependency-management" dependencyManagement { imports { - mavenBom '{@= groupId @}:spring-cloud-config:{@= version @}' + mavenBom '{@= groupId @}:spring-cloud-config:{@= findBom(version) @}' } } diff --git a/_includes/custom.js b/_includes/custom.js new file mode 100644 index 00000000..f237e12b --- /dev/null +++ b/_includes/custom.js @@ -0,0 +1,13 @@ +var defaultBomVersion = "Angel.SR3"; +var boms = { + "1.0.0.RELEASE": "Angel.RELEASE", + "1.0.1.RELEASE": "Angel.SR1", + "1.0.2.RELEASE": "Angel.SR3", + "1.0.3.BUILD-SNAPSHOT": "Angel.BUILD-SNAPSHOT", + "1.1.0.BUILD-SNAPSHOT": "Brixton.BUILD-SNAPSHOT" +}; +function findBom(version) { + if (boms[version]) return boms[version]; + return defaultBomVersion; +} + diff --git a/_includes/pom.xml b/_includes/pom.xml index baf4bb4c..a63a42cd 100644 --- a/_includes/pom.xml +++ b/_includes/pom.xml @@ -3,7 +3,7 @@ {@= groupId @} spring-cloud-config - {@= version @} + {@= findBom(version) @} pom import diff --git a/index.html b/index.html index e224743f..57be99a4 100644 --- a/index.html +++ b/index.html @@ -48,6 +48,7 @@ Config Client features (for Spring applications): ## Quick Start + {% include download_widget.md %} As long as Spring Boot Actuator and Spring Config Client are on the