Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
format
Bryan MacFarlane
committed
Feb 9, 2020
1 parent
4282769
commit dc575ee
Showing
7 changed files
with
108 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import {run} from './main' | ||
import {run} from './main'; | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
import * as os from 'os'; | ||
|
||
export function getPlatform(): string { | ||
// darwin and linux match already | ||
// freebsd not supported yet but future proofed. | ||
|
||
// 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32' | ||
let plat: string = os.platform(); | ||
|
||
// wants 'darwin', 'freebsd', 'linux', 'windows' | ||
if (plat === 'win32') { | ||
plat = 'windows'; | ||
} | ||
|
||
return plat; | ||
// darwin and linux match already | ||
// freebsd not supported yet but future proofed. | ||
|
||
// 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32' | ||
let plat: string = os.platform(); | ||
|
||
// wants 'darwin', 'freebsd', 'linux', 'windows' | ||
if (plat === 'win32') { | ||
plat = 'windows'; | ||
} | ||
|
||
export function getArch(): string { | ||
// 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'. | ||
let arch: string = os.arch(); | ||
|
||
// wants amd64, 386, arm64, armv61, ppc641e, s390x | ||
// currently not supported by runner but future proofed mapping | ||
switch (arch) { | ||
case 'x64': | ||
arch = 'amd64'; | ||
break; | ||
case 'ppc': | ||
arch = 'ppc64'; | ||
break; | ||
case 'x32': | ||
arch = '386'; | ||
break; | ||
} | ||
|
||
return arch; | ||
} | ||
|
||
return plat; | ||
} | ||
|
||
export function getArch(): string { | ||
// 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'. | ||
let arch: string = os.arch(); | ||
|
||
// wants amd64, 386, arm64, armv61, ppc641e, s390x | ||
// currently not supported by runner but future proofed mapping | ||
switch (arch) { | ||
case 'x64': | ||
arch = 'amd64'; | ||
break; | ||
case 'ppc': | ||
arch = 'ppc64'; | ||
break; | ||
case 'x32': | ||
arch = '386'; | ||
break; | ||
} | ||
|
||
return arch; | ||
} |