Merge lp:~bac/juju-gui/1091787 into lp:juju-gui/experimental

Proposed by Brad Crittenden on 2012-12-18
Status: Merged
Merged at revision: 286
Proposed branch: lp:~bac/juju-gui/1091787
Merge into: lp:juju-gui/experimental
Diff against target: 129 lines (+31/-21)
2 files modified
HACKING (+16/-11)
Makefile (+15/-10)
To merge this branch: bzr merge lp:~bac/juju-gui/1091787
Reviewer Review Type Date Requested Status
Benji York (community) code Approve on 2012-12-18
Gary Poster (community) 2012-12-18 Approve on 2012-12-18
Review via email: mp+140528@code.launchpad.net

Description of the Change

Correct build targets for releases.

There was confusion between build, build-prod, and build-debug. A new target
called build-devel has been introduced to replace the old build target. A new
build target now depends on build-prod and build-debug.

To post a comment you must log in.
Gary Poster (gary) wrote :

+1, thank you.

An idea might be to document, in comments or something, what the meaning of devel and debug are: devel is for developers, and debug is for deployments of unaggregated & uncompressed code.

Gary

review: Approve
Benji York (benji) wrote :

Other than one small thing, this looks good.

The small thing is that the change from "make release" to "make distfile" in the docs isn't right. To make a release (which is what those docs are talking about) you do "make release". However, your intent is correct in that we need to document "make distfile" too. A short paragraph about that would be a good addition.

review: Approve (code)
lp:~bac/juju-gui/1091787 updated on 2012-12-18
289. By Brad Crittenden on 2012-12-18

Documentation changes from review.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING'
2--- HACKING 2012-12-12 13:26:46 +0000
3+++ HACKING 2012-12-18 20:33:21 +0000
4@@ -142,8 +142,13 @@
5
6 .. _`pertinent variable names`: `Potentially Useful Release-Oriented Makefile Variables`_
7
8-You also need to have a gpg key, and the python-pytz package installed (as
9-well as launchpadlib, but that is installed by default in Ubuntu).
10+
11+To make the release tarball use:
12+ $ make distfile
13+
14+In order to make and upload the release ('make dist'), you also need to have a
15+gpg key, and the python-pytz package installed (as well as launchpadlib, but
16+that is installed by default in Ubuntu).
17
18 See the Process document (docs/process.rst) for step-by-step checklists to
19 make developer and stable releases.
20@@ -159,7 +164,7 @@
21 release target) will cause the release to be uploaded to the stable series
22 rather than the trunk series. Example usage::
23
24- $ FINAL=1 make release
25+ $ FINAL=1 make dist
26
27 PROD
28 By default, releases will be uploaded to staging.launchpad.net, which is a
29@@ -176,22 +181,22 @@
30
31 Example usage::
32
33- $ PROD=1 make release
34+ $ PROD=1 make dist
35
36-IS_TRUNK_CHECKOUT
37+IS_TRUNK_BRANCH
38 Set this to any non-empty value to force the Makefile to believe it is
39 working with a trunk checkout. Example usage::
40
41- $ IS_TRUNK_CHECKOUT=1 make release
42+ $ IS_TRUNK_BRANCH=1 make dist
43
44-HAS_NO_CHANGES
45+BRANCH_IS_CLEAN
46 Set this to any non-empty value to force the Makefile to believe that the
47 current code tree has no changes. Example usage::
48
49- $ HAS_NO_CHANGES=1 make release
50+ $ BRANCH_IS_CLEAN=1 make dist
51
52-IS_SAFE_RELEASE
53+BRANCH_IS_GOOD
54 Set this to any non-empty value to force the Makefile to bypass checks of
55- IS_TRUNK_CHECKOUT and HAS_NO_CHANGES. Example usage::
56+ IS_TRUNK_BRANCH and BRANCH_IS_CLEAN. Example usage::
57
58- $ IS_SAFE_RELEASE=1 make release
59+ $ BRANCH_IS_GOOD=1 make dist
60
61=== modified file 'Makefile'
62--- Makefile 2012-12-17 14:54:25 +0000
63+++ Makefile 2012-12-18 20:33:21 +0000
64@@ -21,11 +21,11 @@
65 -o -wholename './test/assets*' -prune \
66 -o -wholename './yuidoc*' -prune \
67 -o \( \
68- -name '*.js' \
69- -o -name '*.json' \
70- -o -name 'generateTemplates' \
71- \) -print \
72- | sort | sed -e 's/^\.\///' \
73+ -name '*.js' \
74+ -o -name '*.json' \
75+ -o -name 'generateTemplates' \
76+ \) -print \
77+ | sort | sed -e 's/^\.\///' \
78 | grep -Ev -e '^manifest\.json$$' \
79 -e '^app/assets/javascripts/d3.v2.*.js$$' \
80 -e '^app/assets/javascripts/reconnecting-websocket.js$$' \
81@@ -125,7 +125,7 @@
82 PWD=$(shell pwd)
83 endif
84
85-all: build-debug build-prod
86+all: build
87 @echo "\nDebug and production environments built."
88 @echo "Run 'make help' to list the main available targets."
89
90@@ -335,17 +335,20 @@
91 @echo "to start the production or debug environments respectively."
92 @echo "Run 'make help' to list the main available targets."
93
94-devel: build
95+# devel is used during the development process.
96+devel: build-devel
97 @echo "Running the development environment from node.js ."
98 @echo "Customize config.js to modify server settings."
99 node server.js
100
101+# debug is for deployments of unaggregated and uncompressed code.
102 debug: build-debug
103 @echo "Running the debug environment from a SimpleHTTPServer"
104 @echo "To run the development environment, including automatically"
105 @echo "rebuilding the generated files on changes, run 'make devel'."
106 cd build-debug && python -m SimpleHTTPServer 8888
107
108+# prod is for deployment of aggregated and minimized code.
109 prod: build-prod
110 @echo "Running the production environment from a SimpleHTTPServer"
111 cd build-prod && python -m SimpleHTTPServer 8888
112@@ -363,12 +366,14 @@
113
114 clean-all: clean clean-deps clean-docs
115
116-build: $(APPCACHE) $(NODE_TARGETS) spritegen \
117+build: build-prod build-debug
118+
119+build-devel: $(APPCACHE) $(NODE_TARGETS) spritegen \
120 $(BUILD_FILES) build/juju-ui/version.js
121
122-build-debug: build | $(LINK_DEBUG_FILES)
123+build-debug: build-devel | $(LINK_DEBUG_FILES)
124
125-build-prod: build | $(LINK_PROD_FILES)
126+build-prod: build-devel | $(LINK_PROD_FILES)
127
128 $(APPCACHE): manifest.appcache.in
129 mkdir -p build/juju-ui/assets

Subscribers

People subscribed via source and target branches