Skip to content

Commit

Permalink
fix(vscode): Cherry-picked two paramerters.json fixes (#5131)
Browse files Browse the repository at this point in the history
* fix(vscode): Add Parameters.json in .Net project conversion (#5110)

ConnectionParameterization:
 - add parameters.json to the csproj file when converting to .net (if it's present in the target directory)

* fix(vscode): Refactor Parameters.json into a separate artifact class when converting to NuGet project (#5116)

fix(vscode) AddParametersToArtifacts

---------

Co-authored-by: Michael Reed <60761072+mireedmsft@users.noreply.github.com>
  • Loading branch information
rllyy97 and mireedmsft committed Jul 16, 2024
1 parent 01ca593 commit 2dace66
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import {
connectionsFileName,
parametersFileName,
funcIgnoreFileName,
funcVersionSetting,
hostFileName,
Expand Down Expand Up @@ -194,6 +195,10 @@ async function updateBuildFile(context: IActionContext, target: vscode.Uri, dotn
xmlBuildFile = addFileToBuildPath(xmlBuildFile, connectionFile);
}

for (const parametersFile of projectArtifacts['parameters']) {
xmlBuildFile = addFileToBuildPath(xmlBuildFile, parametersFile);
}

if (projectArtifacts['lib']) {
xmlBuildFile = addLibToPublishPath(xmlBuildFile);
}
Expand Down Expand Up @@ -244,6 +249,7 @@ async function getArtifactNamesFromProject(target: vscode.Uri): Promise<Record<s
const artifactDict: Record<string, string[]> = {
workflows: [],
connections: [],
parameters: [],
artifacts: [],
lib: [],
};
Expand All @@ -254,6 +260,10 @@ async function getArtifactNamesFromProject(target: vscode.Uri): Promise<Record<s
continue;
}

if (file === parametersFileName) {
artifactDict['parameters'].push(parametersFileName);
}

if (file === 'Artifacts') {
artifactDict['artifacts'].push(file);
continue;
Expand Down

0 comments on commit 2dace66

Please sign in to comment.