fix: missing setOutput and simplify os setup
parent
52f57c5e18
commit
f4f7aba8ca
|
|
@ -21,8 +21,6 @@ export class BuildCommand extends CommandBase implements CommandInterface {
|
|||
log.debug('baseImage', baseImage);
|
||||
|
||||
await PlatformSetup.setup(parameters, actionFolder);
|
||||
log.info('Platform setup done.');
|
||||
log.info('OS:', env.getOS());
|
||||
if (env.getOS() === 'darwin') {
|
||||
MacBuilder.run(actionFolder, workspace, parameters);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import { fsSync as fs, exec } from '../../../dependencies.ts';
|
||||
import { Parameters } from '../../../model/index.ts';
|
||||
import ValidateWindows from '../platform-validation/validate-windows.ts';
|
||||
|
||||
class SetupWindows {
|
||||
public static async setup(parameters: Parameters) {
|
||||
ValidateWindows.validate(parameters);
|
||||
await this.generateWinSdkRegistryKey(parameters);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ class PlatformSetup {
|
|||
static async setup(parameters: Parameters, actionFolder: string) {
|
||||
switch (process.platform) {
|
||||
case 'win32':
|
||||
ValidateWindows.validate(parameters);
|
||||
SetupWindows.setup(parameters);
|
||||
await SetupWindows.setup(parameters);
|
||||
break;
|
||||
case 'darwin':
|
||||
await SetupMac.setup(parameters, actionFolder);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ export const core = {
|
|||
console.error(error, error.stack);
|
||||
},
|
||||
|
||||
setOutput: (key, value) => {
|
||||
console.log(`(mock) Output "${key}" is set to "${value}"`);
|
||||
},
|
||||
|
||||
// Adapted from: https://github.com/actions/toolkit/blob/9b7bcb1567c9b7f134eb3c2d6bbf409a5106a956/packages/core/src/core.ts#L128
|
||||
getInput: (name, options) => {
|
||||
const variable = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue