Skip to content

Commit

Permalink
Update PackageManagerClient.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Jan 29, 2024
1 parent 186573b commit 1d8bd04
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions src/DynamoPackages/PackageManagerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,55 +289,6 @@ internal void Publish(Package package, object files, IEnumerable<string> markdow
}
}

/// <summary>
/// This method allows the user to publish a package retaining their predefined folder structure
/// In this case, Dynamo will not allocate files in specific folders, but instead will replicate the folder structure under the chosen publish path
/// </summary>
/// <param name="package">The newly created package</param>
/// <param name="files">List of folders. Each list of lists represents a root folder. There can be one or many root folders.</param>
/// <param name="markdownFiles">Any files located in the user specified markdown folder.</param>
/// <param name="isNewVersion">A boolean showing if this is a new package, or an update to an existing package.</param>
/// <param name="packageUploadHandle">The PackageUploadHandle used to communicate the status of the upload.</param>
internal void PublishRetainFolderStructure(Package package, IEnumerable<IEnumerable<string>> files, IEnumerable<string> markdownFiles, bool isNewVersion, PackageUploadHandle packageUploadHandle)
{
try
{
ResponseBody ret = null;
if (isNewVersion)
{
var pkg = uploadBuilder.NewPackageVersionRetainUpload(package, packageUploadDirectory, files, markdownFiles,
packageUploadHandle);
packageUploadHandle.UploadState = PackageUploadHandle.State.Uploading;
ret = this.client.ExecuteAndDeserialize(pkg);
}
else
{
var pkg = uploadBuilder.NewPackageRetainUpload(package, packageUploadDirectory, files, markdownFiles,
packageUploadHandle);
packageUploadHandle.UploadState = PackageUploadHandle.State.Uploading;
ret = this.client.ExecuteAndDeserialize(pkg);
}
if (ret == null)
{
packageUploadHandle.Error("Failed to submit. Try again later.");
return;
}

if (ret != null && !ret.success)
{
packageUploadHandle.Error(ret.message);
return;
}

packageUploadHandle.Done(null);
}
catch (Exception e)
{
packageUploadHandle.Error(e.GetType() + ": " + e.Message);
}
}


internal PackageManagerResult Deprecate(string name)
{
return FailFunc.TryExecute(() =>
Expand Down

0 comments on commit 1d8bd04

Please sign in to comment.