Skip to content

Commit 0429c43

Browse files
committed
add more comments
1 parent 5e17233 commit 0429c43

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/code/PublishHelper.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,10 @@ private bool CheckDependenciesExist(Hashtable dependencies, string repositoryNam
12621262
return true;
12631263
}
12641264

1265+
/// <summary>
1266+
/// This method is called by Publish-PSResource when the -NupkgPath parameter is specified
1267+
/// The method copies the .nupkg file to a temp path (populated at outputNupkgDir field) as we dont' want to extract and read original .nupkg file
1268+
/// </summary>
12651269
private string CopyNupkgFileToTempPath(string nupkgFilePath, out ErrorRecord errRecord)
12661270
{
12671271
errRecord = null;
@@ -1296,6 +1300,9 @@ private string CopyNupkgFileToTempPath(string nupkgFilePath, out ErrorRecord err
12961300
return destinationFilePath;
12971301
}
12981302

1303+
/// <summary>
1304+
/// Get package info from the .nupkg file provided, inluding package name (_pkgName), package version (_pkgVersion), and metadata parsed into a hashtable (parsedMetadata)
1305+
/// </summary>
12991306
private void GetPackageInfoFromNupkg(string nupkgFilePath, out ErrorRecord errRecord)
13001307
{
13011308
errRecord = null;
@@ -1332,6 +1339,9 @@ private void GetPackageInfoFromNupkg(string nupkgFilePath, out ErrorRecord errRe
13321339
parsedMetadata = GetMetadataFromNupkg(nupkgFilePath, _pkgName, out errRecord);
13331340
}
13341341

1342+
/// <summary>
1343+
/// Extract copied .nupkg, find metadata file (either .ps1, .psd1, or .nuspec) and read metadata into a hashtable
1344+
/// </summary>
13351345
internal Hashtable GetMetadataFromNupkg(string copiedNupkgPath, string packageName, out ErrorRecord errRecord)
13361346
{
13371347
Hashtable pkgMetadata = new Hashtable(StringComparer.OrdinalIgnoreCase);

0 commit comments

Comments
 (0)