Skip to content

Commit

Permalink
Merge pull request #35 from dpinto-pivotal/versionManifests
Browse files Browse the repository at this point in the history
Automatically generate manifest files with correct version. Closes #34
  • Loading branch information
davpin committed Nov 15, 2015
2 parents dc0f035 + badc6f4 commit 422707f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,18 @@ subprojects {
println version

test { finalizedBy jacocoTestReport }

task manifestFilter(type: Copy) {
from 'manifest-unversioned.yml'
into "${buildDir}/"
rename { String fileName ->
fileName.replace('-unversioned', '')
}
expand(version: "${version}")
}

assemble { finalizedBy manifestFilter }

jacocoTestReport {
group = "Reporting"
description = "Generate Jacoco coverage reports after running tests."
Expand Down
2 changes: 2 additions & 0 deletions docs/lab_pushquote.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Luckily, Pivotal Cloud Foundry allows us to assign a [`random-route`](http://doc

> HINT: user the -f option to the push command.
> Manifest files are generated as part of the build. They are placed in `springboottrades-quotes/build`
2. When the script has finished, set the `CF_TARGET` environment variable in both applications to the API endpoint of your Elastic Runtime instance (as in `https://api.example.com`), then restage the applications so that the changes will take effect.

```
Expand Down
4 changes: 2 additions & 2 deletions gradle/versioning.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class ProjectVersion {
ProjectVersion() {
def file = new File('version/number')
if(file.exists()) {
this.build = file.text
this.build = file.text.trim()
} else {
this.build = "0.0.0"
this.build = "0.3.0"
}
}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ env:
applications:
- name: accounts
random-route: true
path: springboottrades-accounts/build/libs/accounts-0.3.jar
path: springboottrades-accounts/build/libs/accounts-${version}.jar
services: [ traderdb, discovery-service, circuit-breaker-dashboard, config-server ]
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ env:
applications:
- name: portfolio
random-route: true
path: springboottrades-portfolio/build/libs/portfolio-0.3.jar
path: springboottrades-portfolio/build/libs/portfolio-${version}.jar
services: [ traderdb, discovery-service, circuit-breaker-dashboard, config-server ]
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ env:
applications:
- name: quotes
random-route: true
path: springboottrades-quotes/build/libs/quotes-0.3.jar
path: springboottrades-quotes/build/libs/quotes-${version}.jar
services: [ discovery-service, circuit-breaker-dashboard, config-server ]
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ env:
applications:
- name: webtrader
random-route: true
path: springboottrades-web/build/libs/web-0.3.jar
path: springboottrades-web/build/libs/web-${version}.jar
services: [ discovery-service, circuit-breaker-dashboard, config-server ]

0 comments on commit 422707f

Please sign in to comment.