vscode-extension: Run docker image with the same version as WAMR (#1815)
This commit is contained in:
@ -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],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user