kopia lustrzana https://github.com/c9/core
tweak c9 publish
rodzic
1043a72bd5
commit
f1161fa5de
|
@ -466,15 +466,24 @@ define(function(require, exports, module) {
|
||||||
json.version = v.join(".");
|
json.version = v.join(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!version)
|
return build();
|
||||||
return build();
|
|
||||||
|
|
||||||
// Write the package.json file
|
function updatePackageJSON(next) {
|
||||||
var indent = data.match(/{\n\r?^ {4}"/) ? 4 : 2;
|
if (!version)
|
||||||
fs.writeFile(packagePath, JSON.stringify(json, null, indent), function(err){
|
return next();
|
||||||
if (err) return callback(err);
|
|
||||||
return build();
|
// Write the package.json file
|
||||||
});
|
var indent = data.match(/{\n\r?^ {4}"/) ? 4 : 2;
|
||||||
|
var newData = JSON.stringify(json, null, indent);
|
||||||
|
fs.writeFile(cwd + "/.c9/.build/pacage.json", newData, function(err){
|
||||||
|
if (dryRun)
|
||||||
|
return next(); // if dry-run is passed only update path in .build
|
||||||
|
fs.writeFile(packagePath, newData, function(err){
|
||||||
|
if (err) return callback(err);
|
||||||
|
return next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Build the package
|
// Build the package
|
||||||
// @TODO add a .c9exclude file that excludes files
|
// @TODO add a .c9exclude file that excludes files
|
||||||
|
@ -702,7 +711,7 @@ define(function(require, exports, module) {
|
||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
proc.execFile("rm", {
|
proc.execFile("rm", {
|
||||||
args: ["-rf", ".c9build"],
|
args: ["-rf", ".c9/.build"],
|
||||||
cwd: cwd
|
cwd: cwd
|
||||||
}, function() {
|
}, function() {
|
||||||
mkdirP(cwd + "/.c9/.build");
|
mkdirP(cwd + "/.c9/.build");
|
||||||
|
@ -712,7 +721,7 @@ define(function(require, exports, module) {
|
||||||
function(next) {
|
function(next) {
|
||||||
var copy = require("architect-build/copy");
|
var copy = require("architect-build/copy");
|
||||||
|
|
||||||
var excludeRe = /^\.(gitignore|hgignore|git|c9|hg|c9build)$/;
|
var excludeRe = /^\.(gitignore|hgignore|git|c9|hg)$/;
|
||||||
var excludeMap = Object.create(null);
|
var excludeMap = Object.create(null);
|
||||||
|
|
||||||
packedFiles.push(cwd + "/__installed__.js");
|
packedFiles.push(cwd + "/__installed__.js");
|
||||||
|
@ -729,7 +738,11 @@ define(function(require, exports, module) {
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
next();
|
||||||
|
},
|
||||||
|
updatePackageJSON,
|
||||||
|
function(next) {
|
||||||
zip();
|
zip();
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
@ -1222,7 +1235,7 @@ define(function(require, exports, module) {
|
||||||
force = false;
|
force = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/***** Register and define API *****/
|
/***** Register and definfe API *****/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
Ładowanie…
Reference in New Issue