do not call install on sm update

This commit is contained in:
nightwing 2012-10-06 14:40:13 +04:00
commit 2b08cebd56
2 changed files with 30 additions and 21 deletions

View file

@ -33,27 +33,36 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
var buildAce = require("./Makefile.dryice").buildAce; var buildAce = require("./Makefile.dryice").buildAce;
var fs = require("fs");
var ACE_HOME = __dirname; var ACE_HOME = __dirname;
try { function getVersion(path) {
var aceProject = { if (fs.existsSync(path + "/.git-ref"))
roots: [ return fs.readFileSync(path + "/.git-ref", "utf8");
ACE_HOME + '/lib', if (fs.existsSync(path + "/.git/ORIG_HEAD"))
ACE_HOME + '/demo' return fs.readFileSync(path + "/.git/ORIG_HEAD", "utf8");
], }
textPluginPattern: /^ace\/requirejs\/text!/
}; if (process.argv.indexOf("-c") > 0) try {
buildAce(aceProject, { var version = getVersion(ACE_HOME);
compress: false, var oldVersion = getVersion(ACE_HOME + "/build");
noconflict: false, if (version && oldVersion == version) {
suffix: "", console.log("ace build is up to date");
compat: true, process.exit(0);
name: "ace" }
}); fs.writeFileSync(ACE_HOME + "/build/.git-ref", version, "utf8");
} catch (e) { } catch (e) {}
console.log("--- Ace Build error ---");
console.log(e); try {
process.exit(0); buildAce({
compress: false,
noconflict: false,
suffix: "",
name: "ace"
});
} catch (e) {
console.log("--- Ace Build error ---");
console.log(e);
process.exit(0);
} }

View file

@ -29,7 +29,7 @@
}, },
"scripts": { "scripts": {
"test": "node lib/ace/test/all.js", "test": "node lib/ace/test/all.js",
"postinstall": "node ./install.js" "postinstall": "node ./install.js -c"
}, },
"config": { "config": {
"github.com/sourcemint/bundler-js/0/-meta/config/0": { "github.com/sourcemint/bundler-js/0/-meta/config/0": {