Add version to pom and gradle build

This commit is contained in:
Dave Syer 2014-04-01 17:22:18 +01:00
parent 9ed3be9ba9
commit 50f95ccf94
3 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,9 @@ class MainController {
@Value('${info.home:http://localhost:8080/}')
private String home
@Value('${info.spring-boot.version:1.0.0.RELEASE}')
private String bootVersion
@Value('${TMPDIR:.}')
private String tmpdir
@ -116,6 +119,7 @@ class MainController {
@RequestMapping("/pom")
@ResponseBody
ResponseEntity<byte[]> pom(PomRequest request, Map model) {
model.bootVersion = bootVersion
new ResponseEntity<byte[]>(render("starter-pom.xml", request, model), ["Content-Type":"application/octet-stream"] as HttpHeaders, HttpStatus.OK)
}
@ -123,6 +127,7 @@ class MainController {
@RequestMapping("/build")
@ResponseBody
ResponseEntity<byte[]> gradle(PomRequest request, Map model) {
model.bootVersion = bootVersion
new ResponseEntity<byte[]>(render("starter-build.gradle", request, model), ["Content-Type":"application/octet-stream"] as HttpHeaders, HttpStatus.OK)
}

View File

@ -1,6 +1,6 @@
buildscript {
ext {
springBootVersion = '1.0.0.BUILD-SNAPSHOT'
springBootVersion = '${bootVersion}'
}
repositories {
mavenLocal()

View File

@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<version>${bootVersion}</version>
</parent>
<dependencies><% styles.each { %>