Skip to content

Commit

Permalink
Make print-version script less dependent on node modules; fix webapp …
Browse files Browse the repository at this point in the history
…manifest.
  • Loading branch information
cscott committed Oct 9, 2012
1 parent 479f6eb commit 7386cfe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions bin/print-version.js
@@ -1,12 +1,18 @@
#!/usr/bin/env node
// node script to emit the current version of the source code

var requirejs = require('requirejs');
requirejs(['commander', 'fs', '../src/version'], function(program, fs, version){
program
.version(version)
.usage('')
.parse(process.argv);
var requirejs = require('../r.js');
requirejs(['../src/version'], function(version) {

try {
// use the node module 'commander' to give a nicer interface,
// if installed.
var program = require('commander');
program
.version(version)
.usage('')
.parse(process.argv);
} catch (e) { /* I guess it's not installed */ }

console.log(version);
});
4 changes: 2 additions & 2 deletions manifest.webapp
@@ -1,5 +1,5 @@
{
"version": "@VERSION@",
"version": "@VERSION@.0",
"name": "Nell's Colors",
"description": "Draw pictures and practice letters",
"icons": {
Expand All @@ -11,7 +11,7 @@
"url": "http://wiki.laptop.org/go/User:CScott"
},
"installs_allowed_from": ["*"],
"appcache_path": "manifest.appcache",
"appcache_path": "/manifest.appcache",
"orientation": "landscape",
"fullscreen": "true",
"default_locale": "en"
Expand Down

0 comments on commit 7386cfe

Please sign in to comment.