mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-19 21:19:24 +00:00
Jake task for pushing built packages. Only to be used by maintainers, unless remote URLs are changed.
This commit is contained in:
1 parent
91ffb0ea0c
commit
6c79a31b38
1 file changed
+30
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user