Jake task for pushing built packages. Only to be used by maintainers, unless remote URLs are changed.

This commit is contained in:
Tom Robinson committed 2009-11-11 05:02:12 -08:00
1 parent 91ffb0ea0c
commit 6c79a31b38
1 file changed
+30
+30
View File
@@ -171,3 +171,33 @@ task ("test", ["build"], function()
if (code !== 0)
OS.exit(code);
});
task("push-packages", ["CommonJS"], function() {
pushPackage(
FILE.join(ENV["CAPP_BUILD"], "Release", "CommonJS", "cappuccino"),
"git@github.com:280north/cappuccino-package.git"
);
pushPackage(
FILE.join(ENV["CAPP_BUILD"], "Release", "CommonJS", "objective-j"),
"git@github.com:280north/objective-j-package.git"
);
});
function pushPackage(path, remote) {
// FIXME: this will probably fail next time...
var cmds = [
["cd", path],
//["rm", "-rf", ".git*"],
["git", "init"],
["git", "add", "."],
["git", "commit", "-m", "Pushed on " + new Date()],
["git", "remote", "add", "origin", remote],
["git", "push", "origin", "master"]
];
var cmdString = cmds.map(function(cmd) {
return cmd.map(OS.enquote).join(" ");
}).join(" && ");
OS.system(cmdString);
}