← Back to team overview

yellow team mailing list archive

[Merge] lp:~makyo/juju-gui/make-appcache into lp:juju-gui

 

Matthew Scott has proposed merging lp:~makyo/juju-gui/make-appcache into lp:juju-gui.

Requested reviews:
  Juju GUI Hackers (juju-gui)

For more details, see:
https://code.launchpad.net/~makyo/juju-gui/make-appcache/+merge/131586

Make target for appcache manifest

Install target now depends on an appcache target, which updates a timestamp in app/assets/manifest.appcache, thus forcing an update in the application cache.

https://codereview.appspot.com/6776052/

-- 
https://code.launchpad.net/~makyo/juju-gui/make-appcache/+merge/131586
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~makyo/juju-gui/make-appcache into lp:juju-gui.
=== modified file 'Makefile'
--- Makefile	2012-10-10 13:37:25 +0000
+++ Makefile	2012-10-26 10:55:25 +0000
@@ -2,6 +2,8 @@
 NODE_TARGETS=node_modules/chai node_modules/d3 node_modules/jshint \
 	node_modules/yui
 TEMPLATE_TARGETS=$(shell bzr ls -k file app/templates)
+DATE=$(shell date -u)
+APPCACHE=app/assets/manifest.appcache
 
 all: prep test
 
@@ -14,7 +16,8 @@
 	@ln -sf `pwd`/node_modules/yui ./app/assets/javascripts/
 	@ln -sf `pwd`/node_modules/d3/d3.v2* ./app/assets/javascripts/
 
-install: $(NODE_TARGETS) app/templates.js
+install: appcache 
+	$(NODE_TARGETS) app/templates.js
 
 gjslint: virtualenv/bin/gjslint
 	@virtualenv/bin/gjslint --strict --nojsdoc --custom_jsdoc_tags=property,default,since --jslint_error=all $(FILES)
@@ -44,4 +47,7 @@
 	@rm -rf node_modules virtualenv
 	@make -C docs clean
 
+appcache:
+	@sed -re 's/^\# TIMESTAMP .+$$/\# TIMESTAMP $(DATE)/' -i $(APPCACHE)
+
 .PHONY: test lint beautify server install clean prep jshint gjslint

=== modified file 'app/assets/manifest.appcache'
--- app/assets/manifest.appcache	2012-10-12 20:36:22 +0000
+++ app/assets/manifest.appcache	2012-10-26 10:55:25 +0000
@@ -1,5 +1,5 @@
 CACHE MANIFEST
-# 2012-10-12 14:10
+# TIMESTAMP Fri Oct 26 10:44:03 UTC 2012
 
 CACHE:
 /juju-ui/assets/svgs/service_module.svg


Follow ups