Try adding Google Drive support to 'deploy'

This commit is contained in:
Joshua Granick
2015-02-16 15:33:52 -08:00
parent 5848ac39a1
commit 428f162a65
2 changed files with 22 additions and 1 deletions

View File

@@ -10,8 +10,25 @@ class DeploymentHelper {
public static function deploy (project:HXProject, targetFlags:Map <String, String>, targetDirectory:String) {
var name = project.meta.title + " (" + project.meta.version + ").zip";
var targetPath = PathHelper.combine (targetDirectory, name);
ZipHelper.compress (PathHelper.combine (targetDirectory, "bin"), PathHelper.combine (targetDirectory, name));
ZipHelper.compress (PathHelper.combine (targetDirectory, "bin"), targetPath);
if (targetFlags.exists ("gdrive")) {
var parent = targetFlags.get ("gdrive");
if (parent != null && parent != "") {
ProcessHelper.runCommand (targetDirectory, "drive", [ "upload", "-f", targetPath, "-p", parent ]);
} else {
ProcessHelper.runCommand (targetDirectory, "drive", [ "upload", "-f", targetPath ]);
}
}
}

View File

@@ -1317,6 +1317,10 @@ class CommandLineTools {
}
} else {
project.targetFlags.set (key, projectDefines.get (key));
}
}