Add option to save Publish profile in VScode (#23067)

* Publish profile save changes for VSCode

* Fix publish settings

* Fix publish settings

* Address comments

* Address comments

* Address comments

* Address comment
This commit is contained in:
Sakshi Sharma
2023-05-16 10:47:58 -07:00
committed by GitHub
parent d9220c809c
commit 244d56eb12
7 changed files with 199 additions and 29 deletions

View File

@@ -21,6 +21,7 @@ import { ISqlProjectPublishSettings } from '../models/deploy/publishSettings';
export async function getPublishDatabaseSettings(project: ISqlProject, promptForConnection: boolean = true): Promise<ISqlProjectPublishSettings | undefined> {
// 1. Select publish settings file (optional)
let publishProfileUri;
// Create custom quickpick so we can control stuff like displaying the loading indicator
const quickPick = vscode.window.createQuickPick();
quickPick.items = [{ label: constants.dontUseProfile }, { label: constants.browseForProfileWithIcon }];
@@ -42,7 +43,7 @@ export async function getPublishDatabaseSettings(project: ISqlProject, promptFor
// If the user cancels out of the file picker then just return and let them choose another option
return;
}
let publishProfileUri = locations[0];
publishProfileUri = locations[0];
try {
// Show loading state while reading profile
quickPick.busy = true;
@@ -214,7 +215,7 @@ export async function getPublishDatabaseSettings(project: ISqlProject, promptFor
connectionUri: connectionUri || '',
sqlCmdVariables: sqlCmdVariables,
deploymentOptions: publishProfile?.options ?? await getDefaultPublishDeploymentOptions(project),
profileUsed: !!publishProfile
publishProfileUri: publishProfileUri
};
return settings;
}