vscode-extension: Run docker image with the same version as WAMR (#1815)

This commit is contained in:
TianlongLiang
2022-12-16 14:15:32 +08:00
committed by GitHub
parent 97d2b5a060
commit d0c4c7036b
10 changed files with 132 additions and 68 deletions

View File

@ -15,7 +15,8 @@ export interface OwnShellOption {
export class WasmTaskProvider implements vscode.TaskProvider {
constructor(
public _type: Map<string, string>,
public _script: Map<string, string>
public _script: Map<string, string>,
public _wamrVersion: string
) {}
buildShellOption: OwnShellOption | undefined;
@ -31,7 +32,11 @@ export class WasmTaskProvider implements vscode.TaskProvider {
let targetName =
TargetConfigPanel.BUILD_ARGS.output_file_name.split('.')[0];
if (os.platform() === 'linux' || os.platform() === 'darwin' || os.platform() === 'win32') {
if (
os.platform() === 'linux' ||
os.platform() === 'darwin' ||
os.platform() === 'win32'
) {
/* build */
this.buildShellOption = {
cmd:
@ -40,7 +45,7 @@ export class WasmTaskProvider implements vscode.TaskProvider {
: (this._script.get('buildScript') as string),
options: {
executable: this._script.get('buildScript'),
shellArgs: [targetName, os.platform()],
shellArgs: [targetName, this._wamrVersion],
},
};
@ -52,7 +57,7 @@ export class WasmTaskProvider implements vscode.TaskProvider {
: (this._script.get('debugScript') as string),
options: {
executable: this._script.get('debugScript'),
shellArgs: [targetName],
shellArgs: [targetName, this._wamrVersion],
},
};
@ -64,7 +69,7 @@ export class WasmTaskProvider implements vscode.TaskProvider {
: (this._script.get('runScript') as string),
options: {
executable: this._script.get('runScript'),
shellArgs: [targetName],
shellArgs: [targetName, this._wamrVersion],
},
};