public static string CreatePackage(string path) { if (string.IsNullOrEmpty(path) || !path.StartsWith(k_PackagesFolder, StringComparison.InvariantCulture)) { throw new ArgumentException(nameof(path)); } //TODO: Find a way to get the organization id var organization = string.Empty; //UnityConnect.instance.userInfo.valid ? UnityConnect.instance.userInfo.primaryOrg : string.Empty; var options = CreatePackageTemplateOptions(path.Substring(k_PackagesFolder.Length), organization); return(PackageTemplate.CreatePackage(options)); }
public static string CreatePackage(string path) { var packagesFolder = Folders.GetPackagesPath() + "/"; if (string.IsNullOrEmpty(path) || !path.StartsWith(packagesFolder, StringComparison.InvariantCulture)) { throw new ArgumentException(nameof(path)); } var organization = UnityConnect.instance.userInfo.valid ? UnityConnect.instance.userInfo.primaryOrg : string.Empty; var options = CreatePackageTemplateOptions(path.Substring(packagesFolder.Length), organization); return(PackageTemplate.CreatePackage(options)); }