mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2025-05-04 05:55:28 +08:00

- Support macOS and Windows (Close #24 ) - Refactoring - Error handling - TypeScript - Prettier (Close #29 ) - GHA: Add upload-artifact step for test coverage - deps: Install husky
13 lines
339 B
TypeScript
13 lines
339 B
TypeScript
export default function getOS(platform: string) {
|
|
if (platform === 'linux') {
|
|
return 'Linux';
|
|
} else if (platform === 'darwin') {
|
|
return 'macOS';
|
|
} else if (platform === 'win32') {
|
|
return 'Windows';
|
|
// throw new Error("Windows is not supported");
|
|
} else {
|
|
throw new Error(`${platform} is not supported`);
|
|
}
|
|
}
|