Merge ~cjwatson/turnip:version-info-from-git into turnip:master

Proposed by Colin Watson on 2015-12-08
Status: Merged
Merged at revision: 93ce4af4cb28c61d777a1e2baf26460baf71246d
Proposed branch: ~cjwatson/turnip:version-info-from-git
Merge into: turnip:master
Diff against target: 55 lines (+8/-5)
3 files modified
.gitignore (+1/-0)
Makefile (+4/-4)
README (+3/-1)
Reviewer Review Type Date Requested Status
William Grant code 2015-12-08 Approve on 2015-12-09
Review via email: mp+279906@code.launchpad.net

Commit Message

Generate build label and version_info from git

Description of the Change

Generate build label and version_info from git, and generally update to cope with the code being hosted in git.

To post a comment you must log in.
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2index 8525cd2..6912b70 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -11,6 +11,7 @@ pip-cache
6 .installed.cfg
7 *.log
8 parts
9+*.pyc
10 tags
11 TAGS
12 turnip/version_info.py
13diff --git a/Makefile b/Makefile
14index bd75caf..b088b7a 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -17,7 +17,7 @@ endif
18
19 # Create archives in labelled directories (e.g.
20 # <rev-id>/$(PROJECT_NAME).tar.gz)
21-TARBALL_BUILD_LABEL ?= $(shell bzr log -rlast: --show-ids | sed -n 's/^revision-id: //p')
22+TARBALL_BUILD_LABEL ?= $(shell git rev-parse HEAD)
23 TARBALL_FILE_NAME = turnip.tar.gz
24 TARBALL_BUILDS_DIR ?= build
25 TARBALL_BUILD_DIR = $(TARBALL_BUILDS_DIR)/$(TARBALL_BUILD_LABEL)
26@@ -26,12 +26,12 @@ TARBALL_BUILD_PATH = $(TARBALL_BUILD_DIR)/$(TARBALL_FILE_NAME)
27 build: $(ENV)
28
29 turnip/version_info.py:
30- bzr version-info --format=python >$@
31+ echo 'version_info = {"revision_id": "$(TARBALL_BUILD_LABEL)"}' >$@
32
33 $(ENV): turnip/version_info.py
34 ifeq ($(PIP_SOURCE_DIR),)
35- @echo "Set PIP_SOURCE_DIR to the path of a checkout of" >&2
36- @echo "lp:~canonical-launchpad-branches/turnip/dependencies." >&2
37+ @echo "Set PIP_SOURCE_DIR to the path of a clone of" >&2
38+ @echo "lp:~canonical-launchpad-branches/turnip/+git/dependencies." >&2
39 @exit 1
40 endif
41 mkdir -p $(ENV)
42diff --git a/README b/README
43index 2332da3..2a13241 100644
44--- a/README
45+++ b/README
46@@ -84,7 +84,9 @@ The HTTP API can be started with:
47 Deployment
48 ----------
49
50-Turnip is deployed with the turnip juju charm, available from bzr branch lp:~canonical-launchpad-branches/charms/trusty/turnip/devel.
51+Turnip is deployed with the turnip juju charm, available from:
52+
53+ git clone https://git.launchpad.net/~canonical-launchpad-branches/charms/+source/turnip
54
55 To deploy with the local provider:
56

Subscribers

People subscribed via source and target branches