diff --git a/src/config/runtime.test.ts b/src/config/runtime.test.ts index ef108f0b..551db900 100644 --- a/src/config/runtime.test.ts +++ b/src/config/runtime.test.ts @@ -47,5 +47,6 @@ describe("Runtime", () => { expect(getFunctionWorkerRuntime(Runtime.PYTHON38)).toBe("python"); expect(getFunctionWorkerRuntime(Runtime.DOTNET31)).toBe("dotnet"); expect(getFunctionWorkerRuntime(Runtime.DOTNET22)).toBe("dotnet"); + expect(getFunctionWorkerRuntime(Runtime.DOTNET60)).toBe("dotnet"); }); }); diff --git a/src/config/runtime.ts b/src/config/runtime.ts index 553427ac..e9487b98 100644 --- a/src/config/runtime.ts +++ b/src/config/runtime.ts @@ -8,6 +8,7 @@ export enum Runtime { PYTHON38 = "python3.8", DOTNET22 = "dotnet2.2", DOTNET31 = "dotnet3.1", + DOTNET60 = "dotnet6.0", } export const supportedRuntimes = [ @@ -18,7 +19,8 @@ export const supportedRuntimes = [ Runtime.PYTHON37, Runtime.PYTHON38, Runtime.DOTNET22, - Runtime.DOTNET31 + Runtime.DOTNET31, + Runtime.DOTNET60 ] export const supportedRuntimeSet = new Set(supportedRuntimes); @@ -42,7 +44,8 @@ export enum BuildMode { export const compiledRuntimes = new Set([ Runtime.DOTNET22, - Runtime.DOTNET31 + Runtime.DOTNET31, + Runtime.DOTNET60, ]); export function isCompiledRuntime(runtime: Runtime): boolean { @@ -96,4 +99,5 @@ export const dockerImages = { "python3.7": "PYTHON|3.7", "python3.8": "PYTHON|3.8", "dotnet3.1": "DOTNET|3.1", + "dotnet6.0": "DOTNET|6.0", } diff --git a/src/services/configService.ts b/src/services/configService.ts index ff2f0fe1..65d09177 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -350,5 +350,31 @@ export class ConfigService { constants.tmpBuildDir ], }); + + this.cliCommandFactory.registerCommand(`${Runtime.DOTNET60}-${BuildMode.RELEASE}`, { + command: "dotnet", + args: [ + "build", + "--configuration", + "release", + "--framework", + "net6.0", + "--output", + constants.tmpBuildDir + ], + }); + + this.cliCommandFactory.registerCommand(`${Runtime.DOTNET60}-${BuildMode.DEBUG}`, { + command: "dotnet", + args: [ + "build", + "--configuration", + "debug", + "--framework", + "net6.0", + "--output", + constants.tmpBuildDir + ], + }); } }