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
+5
View File
@@ -10,6 +10,9 @@ class MainController {
@Value('${info.home:http://localhost:8080/}') @Value('${info.home:http://localhost:8080/}')
private String home private String home
@Value('${info.spring-boot.version:1.0.0.RELEASE}')
private String bootVersion
@Value('${TMPDIR:.}') @Value('${TMPDIR:.}')
private String tmpdir private String tmpdir
@@ -116,6 +119,7 @@ class MainController {
@RequestMapping("/pom") @RequestMapping("/pom")
@ResponseBody @ResponseBody
ResponseEntity<byte[]> pom(PomRequest request, Map model) { 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) 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") @RequestMapping("/build")
@ResponseBody @ResponseBody
ResponseEntity<byte[]> gradle(PomRequest request, Map model) { 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) new ResponseEntity<byte[]>(render("starter-build.gradle", request, model), ["Content-Type":"application/octet-stream"] as HttpHeaders, HttpStatus.OK)
} }
+1 -1
View File
@@ -1,6 +1,6 @@
buildscript { buildscript {
ext { ext {
springBootVersion = '1.0.0.BUILD-SNAPSHOT' springBootVersion = '${bootVersion}'
} }
repositories { repositories {
mavenLocal() mavenLocal()
+1 -1
View File
@@ -13,7 +13,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version> <version>${bootVersion}</version>
</parent> </parent>
<dependencies><% styles.each { %> <dependencies><% styles.each { %>