2020-01-02 15:13:47 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2019-03-06 16:54:58 -05:00
|
|
|
|
2019-03-11 20:34:48 -04:00
|
|
|
export type OperatingSystem = "mac" | "win" | "linux";
|
|
|
|
|
|
|
|
export type Arch = "x64" | "arm64";
|
|
|
|
|
2019-03-06 16:54:58 -05:00
|
|
|
// Do not add unsupported platforms.
|
|
|
|
export interface BuildInfo {
|
2019-03-11 20:34:48 -04:00
|
|
|
arch: Arch;
|
2019-03-06 16:54:58 -05:00
|
|
|
|
2019-03-11 20:34:48 -04:00
|
|
|
os: OperatingSystem;
|
2019-03-06 16:54:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export const build: BuildInfo = {
|
2019-09-06 12:57:15 -04:00
|
|
|
arch: "" as Arch,
|
|
|
|
os: "" as OperatingSystem
|
2019-03-06 16:54:58 -05:00
|
|
|
};
|
|
|
|
|
2019-09-06 12:57:15 -04:00
|
|
|
export function setBuildInfo(os: OperatingSystem, arch: Arch): void {
|
|
|
|
build.os = os;
|
|
|
|
build.arch = arch;
|
|
|
|
|
|
|
|
Object.freeze(build);
|
|
|
|
}
|