()
| 46 | const expectedVersion = ValidMacOSVersions[channel] |
| 47 | |
| 48 | function validateMacOSVersion() { |
| 49 | try { |
| 50 | const actualVersion = resolveVersionInInfoPlist() |
| 51 | |
| 52 | if (actualVersion !== expectedVersion) { |
| 53 | handleError( |
| 54 | `The minimum macOS version for the ${channel} channel is incorrect. Expected ${expectedVersion} but found ${actualVersion}.` |
| 55 | ) |
| 56 | } |
| 57 | |
| 58 | console.log( |
| 59 | `The minimum macOS version for the ${channel} channel is correct: ${actualVersion}.` |
| 60 | ) |
| 61 | } catch (error) { |
| 62 | handleError( |
| 63 | `Failed to validate macOS version: ${ |
| 64 | error instanceof Error ? error.message : String(error) |
| 65 | }` |
| 66 | ) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | function isChannelToValidate(channel: string): channel is ChannelToValidate { |
| 71 | return Object.keys(ValidMacOSVersions).includes(channel) |
no test coverage detected