GitHub user sjcorbett opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/129
Makes git metadata available to build
Git SHA-1 of `HEAD` and branch name are incorporated into:
* manifests as Implementation-SHA-1 and Implementation-Branch
* REST API at `/v1/server/version`.
* jsgui (only sha-1) as comment in index.html
I've modified `ServerApi.getVersion` to return a `VersionSummary` object
rather than just a String:
```
$ http :8081/v1/server/version
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Type: application/json
Server: Jetty(8.1.4.v20120524)
Transfer-Encoding: chunked
{
"buildBranch": "build-sha1",
"buildSha1": "63e9f1ec8864fa2ac5ccd1f99f28a7f0b260a8b4",
"version": "0.7.0-SNAPSHOT"
}
```
Should I deprecate the old version and add a separate API call instead?
There were no uses of the method in Brooklyn.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sjcorbett/incubator-brooklyn build-sha1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/129.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #129
----
commit c74288157552a8b00a8f40d55f3a0c6403840078
Author: Sam Corbett <[email protected]>
Date: 2014-08-22T14:00:56Z
Simplifies WebApplicationException class
commit 3910eb1f11b5d946c7651dacbee79a01102c6f07
Author: Sam Corbett <[email protected]>
Date: 2014-08-22T14:06:20Z
Build produces Git SHA 1 and branch name metadata
Incorporated into
* manifests as Implementation-SHA-1 and Implementation-Branch
* REST API at /v1/server/version.
* jsgui (only sha-1) as comment in index.html
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---