Merge lp:~frankban/juju-gui/bug-1095663-test-final into lp:juju-gui/experimental

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 326
Proposed branch: lp:~frankban/juju-gui/bug-1095663-test-final
Merge into: lp:juju-gui/experimental
Diff against target: 64 lines (+8/-5)
2 files modified
Makefile (+5/-1)
docs/process.rst (+3/-4)
To merge this branch: bzr merge lp:~frankban/juju-gui/bug-1095663-test-final
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+143693@code.launchpad.net

Description of the change

Avoid version check if make target != dist[file]

Our Makefile stops the execution if the user:
1) tries to make a stable release and the latest
version in CHANGES.yaml is "unreleased";
2) tries to make a devel release and the latest
version is not "unreleased".

Now this check is only performed when the make
target is dist or distfile, so that it is
possible, e.g., to run tests on a stable release
without defining FINAL=1.

Updated process documentation.

https://codereview.appspot.com/7138054/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :
Download full text (3.9 KiB)

Reviewers: mp+143693_code.launchpad.net,

Message:
Please take a look.

Description:
Avoid version check if make target != dist[file]

Our Makefile stops the execution if the user:
1) tries to make a stable release and the latest
version in CHANGES.yaml is "unreleased";
2) tries to make a devel release and the latest
version is not "unreleased".

Now this check is only performed when the make
target is dist or distfile, so that it is
possible, e.g., to run tests on a stable release
without defining FINAL=1.

Updated process documentation.

https://code.launchpad.net/~frankban/juju-gui/bug-1095663-test-final/+merge/143693

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/7138054/

Affected files:
   M Makefile
   A [revision details]
   M docs/process.rst

Index: Makefile
=== modified file 'Makefile'
--- Makefile 2013-01-10 16:32:14 +0000
+++ Makefile 2013-01-17 12:20:14 +0000
@@ -55,25 +55,30 @@
  ULTIMATE_VERSION=$(shell grep '^-' CHANGES.yaml | head -n 1 |
sed 's/[ :-]//g')
  PENULTIMATE_VERSION=$(shell grep '^-' CHANGES.yaml | head -n 2 | tail -n 1
\
      | sed 's/[ :-]//g')
+RELEASE_TARGETS=dist distfile
  # If the user specified (via setting an environment variable on the command
  # line) that this is a final (non-development) release, set the version
number
  # and series appropriately.
  ifdef FINAL
  # If this is a FINAL (non-development) release, then the most recent
version
  # number should not be "unreleased".
+ifneq (, $(filter $(RELEASE_TARGETS), $(MAKECMDGOALS)))
  ifeq ($(ULTIMATE_VERSION), unreleased)
      $(error FINAL releases must have a most-recent version number other
than \
   "unreleased" in CHANGES.yaml)
  endif
+endif
  RELEASE_VERSION=$(ULTIMATE_VERSION)
  SERIES=stable
  else
  # If this is development (non-FINAL) release, then the most recent version
  # number must be "unreleased".
+ifneq (, $(filter $(RELEASE_TARGETS), $(MAKECMDGOALS)))
  ifneq ($(ULTIMATE_VERSION), unreleased)
      $(error non-FINAL releases must have a most-recent version number of \
   "unreleased" in CHANGES.yaml)
  endif
+endif
  RELEASE_VERSION=$(PENULTIMATE_VERSION)+build.$(BZR_REVNO)
  SERIES=trunk
  endif
@@ -142,7 +147,6 @@
   @echo "test-debug: run tests in the browser from the debug environment"
   @echo "test-prod: run tests in the browser from the production
environment"
   @echo " FIXME: currently yielding 78 failures"
- @echo "test: same as the test-debug target"
   @echo "prep: beautify and lint the source"
   @echo "docs: generate Sphinx and YUIdoc documentation"
   @echo "help: this description"

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision:
<email address hidden>

Index: docs/process.rst
=== modified file 'docs/process.rst'
--- docs/process.rst 2013-01-16 11:52:55 +0000
+++ docs/process.rst 2013-01-17 13:53:15 +0000
@@ -121,14 +121,13 @@
    is ``unreleased``, do the following.

    * De...

Read more...

Revision history for this message
Gary Poster (gary) wrote :

Land as is. Thank you! Nice clean up.

Gary

https://codereview.appspot.com/7138054/diff/1/Makefile
File Makefile (right):

https://codereview.appspot.com/7138054/diff/1/Makefile#newcode65
Makefile:65: ifneq (, $(filter $(RELEASE_TARGETS), $(MAKECMDGOALS)))
Ooh, I didn't know about MAKECMDGOALS. Thanks

https://codereview.appspot.com/7138054/

Revision history for this message
Nicola Larosa (teknico) wrote :

Land as is, or with changes. :-)

https://codereview.appspot.com/7138054/diff/1/Makefile
File Makefile (right):

https://codereview.appspot.com/7138054/diff/1/Makefile#newcode66
Makefile:66: ifeq ($(ULTIMATE_VERSION), unreleased)
It would be nice if we could indent the nested sections (not new to this
branch). It's difficult following the blocks without indentation.

https://codereview.appspot.com/7138054/

Revision history for this message
Francesco Banconi (frankban) wrote :

Thanks for the reviews! Landing.

https://codereview.appspot.com/7138054/diff/1/Makefile
File Makefile (right):

https://codereview.appspot.com/7138054/diff/1/Makefile#newcode66
Makefile:66: ifeq ($(ULTIMATE_VERSION), unreleased)
On 2013/01/17 15:53:47, teknico wrote:
> It would be nice if we could indent the nested sections (not new to
this
> branch). It's difficult following the blocks without indentation.

I discussed this issue with Gary. I'll add a slack card to investigate
Makefile indentation. I think a specific branch for this task would be a
nice idea.

https://codereview.appspot.com/7138054/

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Avoid version check if make target != dist[file]

Our Makefile stops the execution if the user:
1) tries to make a stable release and the latest
version in CHANGES.yaml is "unreleased";
2) tries to make a devel release and the latest
version is not "unreleased".

Now this check is only performed when the make
target is dist or distfile, so that it is
possible, e.g., to run tests on a stable release
without defining FINAL=1.

Updated process documentation.

R=gary.poster, teknico
CC=
https://codereview.appspot.com/7138054

https://codereview.appspot.com/7138054/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2013-01-10 16:32:14 +0000
3+++ Makefile 2013-01-17 14:08:22 +0000
4@@ -55,25 +55,30 @@
5 ULTIMATE_VERSION=$(shell grep '^-' CHANGES.yaml | head -n 1 | sed 's/[ :-]//g')
6 PENULTIMATE_VERSION=$(shell grep '^-' CHANGES.yaml | head -n 2 | tail -n 1 \
7 | sed 's/[ :-]//g')
8+RELEASE_TARGETS=dist distfile
9 # If the user specified (via setting an environment variable on the command
10 # line) that this is a final (non-development) release, set the version number
11 # and series appropriately.
12 ifdef FINAL
13 # If this is a FINAL (non-development) release, then the most recent version
14 # number should not be "unreleased".
15+ifneq (, $(filter $(RELEASE_TARGETS), $(MAKECMDGOALS)))
16 ifeq ($(ULTIMATE_VERSION), unreleased)
17 $(error FINAL releases must have a most-recent version number other than \
18 "unreleased" in CHANGES.yaml)
19 endif
20+endif
21 RELEASE_VERSION=$(ULTIMATE_VERSION)
22 SERIES=stable
23 else
24 # If this is development (non-FINAL) release, then the most recent version
25 # number must be "unreleased".
26+ifneq (, $(filter $(RELEASE_TARGETS), $(MAKECMDGOALS)))
27 ifneq ($(ULTIMATE_VERSION), unreleased)
28 $(error non-FINAL releases must have a most-recent version number of \
29 "unreleased" in CHANGES.yaml)
30 endif
31+endif
32 RELEASE_VERSION=$(PENULTIMATE_VERSION)+build.$(BZR_REVNO)
33 SERIES=trunk
34 endif
35@@ -142,7 +147,6 @@
36 @echo "test-debug: run tests in the browser from the debug environment"
37 @echo "test-prod: run tests in the browser from the production environment"
38 @echo " FIXME: currently yielding 78 failures"
39- @echo "test: same as the test-debug target"
40 @echo "prep: beautify and lint the source"
41 @echo "docs: generate Sphinx and YUIdoc documentation"
42 @echo "help: this description"
43
44=== modified file 'docs/process.rst'
45--- docs/process.rst 2013-01-16 11:52:55 +0000
46+++ docs/process.rst 2013-01-17 14:08:22 +0000
47@@ -121,14 +121,13 @@
48 is ``unreleased``, do the following.
49
50 * Decide what the next version number should be (see `Semantic Versioning
51- <http://semver.org/>`_).
52- and change ``unreleased`` to that value.
53+ <http://semver.org/>`_) and change ``unreleased`` to that value.
54 * Commit to the branch with this checkin message:
55 ``bzr commit -m 'Set version for release.'``
56 * Push the branch directly to the parent (``bzr push :parent`` should work).
57
58-- Run the tests and verify they pass: ``FINAL=1 make test-prod`` and then
59- ``FINAL=1 make test-debug``.
60+- Run the tests and verify they pass: ``make test-prod`` and then
61+ ``make test-debug``.
62 - Create the tarball: ``FINAL=1 make distfile``. The process will end by
63 reporting the name of the tarball it made.
64 - In an empty temporary directory somewhere else on your system, expand the

Subscribers

People subscribed via source and target branches