launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06373
[Merge] lp:~stevenk/launchpad/two-part-combobuild into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/two-part-combobuild into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/two-part-combobuild/+merge/93125
Make bin/combo-rootdir safe to run anywhere, since it no longer needs convoy.
Only generate the meta file in combobuild. Split out the code that checked the meta file into a separate script, utilites/check-js-deps and call it from combobuild.
Remove the convoy root before linking it, otherwise ln creates a js directory in build/js.
--
https://code.launchpad.net/~stevenk/launchpad/two-part-combobuild/+merge/93125
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/two-part-combobuild into lp:launchpad.
=== modified file 'Makefile'
--- Makefile 2012-02-13 01:13:43 +0000
+++ Makefile 2012-02-15 03:59:20 +0000
@@ -142,7 +142,8 @@
chmod 777 $(CODEHOSTING_ROOT)/rewrite.log
touch $(CODEHOSTING_ROOT)/config/launchpad-lookup.txt
if [ -d /srv/launchpad.dev ]; then \
- ln -sf $(WD)/build/js $(CONVOY_ROOT); \
+ $(RM) $(CONVOY_ROOT); \
+ ln -s $(WD)/build/js $(CONVOY_ROOT); \
fi
build: compile apidoc jsbuild css_combine sprite_image
@@ -189,10 +190,12 @@
endif
combobuild:
+ utilities/js-deps -n LP_MODULES -s build/js/lp -x '-min.js' -o build/js/lp/meta.js >/dev/null
+ utilities/check-js-deps
+
+jsbuild: $(PY) $(JS_OUT)
bin/combo-rootdir build/js
-jsbuild: $(PY) $(JS_OUT)
-
eggs:
# Usually this is linked via link-external-sourcecode, but in
# deployment we create this ourselves.
=== modified file 'buildout-templates/bin/combo-rootdir.in'
--- buildout-templates/bin/combo-rootdir.in 2012-02-14 01:34:27 +0000
+++ buildout-templates/bin/combo-rootdir.in 2012-02-15 03:59:20 +0000
@@ -39,19 +39,5 @@
cp lib/lp/services/worlddata/javascript/languages.js $BUILD_DIR/lp
cp lib/lp/app/longpoll/javascript/longpoll.js $BUILD_DIR/lp
-# Build the LP module definition file.
-utilities/js-deps -n LP_MODULES -s $BUILD_DIR/lp -o $BUILD_DIR/lp/meta.js >/dev/null
-
# Minify our JS.
bin/py -m lp.scripts.utilities.js.jsmin_all $BUILD_DIR/lp
-
-# Check if any JS modules are missing.
-error=0
-for mod in $(grep ' LP' $BUILD_DIR/lp/meta.js | tr -s ' ' | cut -d\ -f2) ; do
- if ! grep -q "modules\[$mod\]" $BUILD_DIR/lp/meta.js ; then
- echo "ERROR: $mod is not mentioned in the meta file"
- error=1
- fi
-done
-
-exit $error
=== added file 'utilities/check-js-deps'
--- utilities/check-js-deps 1970-01-01 00:00:00 +0000
+++ utilities/check-js-deps 2012-02-15 03:59:20 +0000
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Copyright 2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+set -e
+
+error=0
+for mod in $(grep ' LP' build/js/lp/meta.js | tr -s ' ' | cut -d\ -f2) ; do
+ if ! grep -q "modules\[$mod\]" build/js/lp/meta.js ; then
+ echo "ERROR: $mod is not mentioned in the meta file"
+ error=1
+ fi
+done
+exit $error
+