Skip to content

Commit

Permalink
fix: Adjust build command used for dotnet functions (#7557)
Browse files Browse the repository at this point in the history
* Adjust build command used for dotnet functions

* pass in the appid/passwd to functions

* correct source of appid/password ford func deploy

Co-authored-by: Soroush <[email protected]>
Co-authored-by: Chris Whitten <[email protected]>
  • Loading branch information
3 people authored May 4, 2021
1 parent e9c2014 commit 8acc50e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 2 additions & 0 deletions extensions/azurePublish/src/node/provision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ export class BotProjectProvision {
location: config.location ?? provisionResults.resourceGroup.location,
name: config.hostname,
workerRuntime: config.workerRuntime,
appId: provisionResults.appId,
appPwd: provisionResults.appPassword,
});
provisionResults.webApp = {
hostname: functionsHostName,
Expand Down
12 changes: 1 addition & 11 deletions extensions/runtimes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,17 +535,7 @@ export default async (composer: any): Promise<void> => {

// do the dotnet publish
try {
const configuration = JSON.parse(profile.configuration);
const runtimeIdentifier = configuration.runtimeIdentifier;

// TODO: swap these lines??? ben to confirm
// Don't set self-contained and runtimeIdentifier for AzureFunctions.
// let buildCommand = `dotnet publish "${dotnetProjectPath}" -c release -o "${publishFolder}" -v q`;
// if runtime identifier set, make dotnet runtime to self contained, default runtime identifier is win-x64, please refer to https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
const buildCommand = `dotnet publish "${dotnetProjectPath}" -c release -o "${publishFolder}" -v q --self-contained true -r ${
runtimeIdentifier ?? 'win-x64'
}`;
// }
const buildCommand = `dotnet publish "${dotnetProjectPath}" -c release -o "${publishFolder}" -v q`;
const { stdout, stderr } = await execAsync(buildCommand, {
cwd: runtimePath,
});
Expand Down

0 comments on commit 8acc50e

Please sign in to comment.