private bool CopyContent(UMakeTarget umakeTarget, string version, string buildPath) { string contentFolderPath = GetContentFolderPath(); if (!Directory.Exists(contentFolderPath)) { Debug.LogFormat("Content folder \"{0}\" does not exist.", contentFolderPath); return(false); } UMakeTarget.Path targetPath = umakeTarget.GetTargetPath(version, buildPath); if (!Directory.Exists(targetPath.directoryPath)) { Debug.LogFormat("Target path \"{0}\" does not exist. Did you forget to build?", targetPath.directoryPath); return(false); } string uploadFolderPath = Path.Combine(contentFolderPath, contentSubFolder); if (Directory.Exists(uploadFolderPath)) { Directory.Delete(uploadFolderPath, true); } FileSystemHelper.CopyDirectory(targetPath.directoryPath, uploadFolderPath); Debug.LogFormat("Build files copied to \"{0}\".", uploadFolderPath); return(true); }
public static void Build() { ExecuteOnTarget((umake, target) => { string buildPath; Args.TryGetValue("path", out buildPath); Debug.LogFormat("\n\nBuilding for target: '{0}' at '{1}'.\n\n", target.name, buildPath); UMakeTarget.Path targetPath = target.GetTargetPath(umake.version, buildPath); target.Build(umake, targetPath); }); }