Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@
"icon": "$(cloud-upload)",
"enablement": "!virtualWorkspace"
},
{
"command": "azureFunctions.deployByFunctionAppId",
"title": "%azureFunctions.deployByFunctionAppId%",
"category": "Azure Functions",
"enablement": "!virtualWorkspace"
},
{
"command": "azureFunctions.deploySlot",
"title": "%azureFunctions.deploySlot%",
Expand Down Expand Up @@ -662,6 +668,10 @@
}
],
"commandPalette": [
{
"command": "azureFunctions.deployByFunctionAppId",
"when": "never"
},
{
"command": "azureFunctions.openInPortal",
"when": "never"
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"azureFunctions.deleteFunctionApp": "Delete Function App...",
"azureFunctions.deleteSlot": "Delete Slot...",
"azureFunctions.deploy": "Deploy to Function App...",
"azureFunctions.deployByFunctionAppId": "Deploy to Function App by ID...",
"azureFunctions.deploySlot": "Deploy to Slot...",
"azureFunctions.deploySubpath": "The default subpath of a workspace folder to use when deploying. If set, you will not be prompted for the folder path when deploying.",
"azureFunctions.description": "An Azure Functions extension for Visual Studio Code.",
Expand Down
8 changes: 6 additions & 2 deletions src/commands/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ import { verifyAppSettings } from './verifyAppSettings';

export type IFuncDeployContext = IDeployContext & ISetConnectionSettingContext & ExecuteActivityContext;

export async function deployProductionSlot(context: IActionContext, target?: vscode.Uri | string | SlotTreeItem, functionAppId?: string | {}): Promise<void> {
await deploy(context, target, functionAppId);
export async function deployProductionSlot(context: IActionContext, target?: vscode.Uri | string | SlotTreeItem): Promise<void> {
await deploy(context, target, undefined);
}

export async function deployProductionSlotByFunctionAppId(context: IActionContext, functionAppId?: string | {}): Promise<void> {
await deploy(context, undefined, functionAppId);
}

export async function deploySlot(context: IActionContext, target?: vscode.Uri | string | SlotTreeItem, functionAppId?: string | {}): Promise<void> {
Expand Down
6 changes: 5 additions & 1 deletion src/commands/registerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { createSlot } from './createSlot';
import { deleteFunction } from './deleteFunction';
import { deleteFunctionApp } from './deleteFunctionApp';
import { deleteNode } from './deleteNode';
import { deployProductionSlot, deploySlot } from './deploy/deploy';
import { deployProductionSlot, deployProductionSlotByFunctionAppId, deploySlot } from './deploy/deploy';
import { connectToGitHub } from './deployments/connectToGitHub';
import { disconnectRepo } from './deployments/disconnectRepo';
import { redeployDeployment } from './deployments/redeployDeployment';
Expand Down Expand Up @@ -112,6 +112,10 @@ export function registerCommands(): void {
);
registerCommandWithTreeNodeUnwrapping('azureFunctions.disableFunction', disableFunction);
registerCommandWithTreeNodeUnwrapping('azureFunctions.deploy', deployProductionSlot);

// See: https://github.com/microsoft/vscode-azurefunctions/pull/4125
registerCommand('azureFunctions.deployByFunctionAppId', deployProductionSlotByFunctionAppId);

registerCommandWithTreeNodeUnwrapping('azureFunctions.deploySlot', deploySlot);
registerCommandWithTreeNodeUnwrapping('azureFunctions.disconnectRepo', disconnectRepo);
registerCommandWithTreeNodeUnwrapping('azureFunctions.enableFunction', enableFunction);
Expand Down