forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.defines.js
More file actions
53 lines (44 loc) · 2.53 KB
/
rollup.config.defines.js
File metadata and controls
53 lines (44 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Licensed to the .NET Foundation under one or more agreements.
//! The .NET Foundation licenses this file to you under the MIT license.
/* eslint-disable no-console */
import gitCommitInfo from "git-commit-info";
if (process.env.ContinuousIntegrationBuild === undefined) {
throw new Error("ContinuousIntegrationBuild environment variable is not defined");
}
if (process.env.Configuration === undefined) {
throw new Error("Configuration environment variable is not defined");
}
if (process.env.ProductVersion === undefined) {
throw new Error("ProductVersion environment variable is not defined");
}
export const configuration = process.env.Configuration !== "Release" && process.env.Configuration !== "RELEASE" ? "Debug" : "Release";
export const productVersion = process.env.ProductVersion;
export const isContinuousIntegrationBuild = process.env.ContinuousIntegrationBuild === "true" ? true : false;
export const staticLibDestination = process.env.StaticLibDestination || "../../artifacts/bin/browser-wasm.Debug/corehost";
console.log(`Rollup configuration: Configuration=${configuration}, ProductVersion=${productVersion}, ContinuousIntegrationBuild=${isContinuousIntegrationBuild}`);
export const banner = "//! Licensed to the .NET Foundation under one or more agreements.\n//! The .NET Foundation licenses this file to you under the MIT license.\n//! This is generated file, see src/native/libs/Browser/rollup.config.defines.js\n\n";
export const banner_dts = banner + "//! This is not considered public API with backward compatibility guarantees. \n";
export const keep_classnames = /(ManagedObject|ManagedError|Span|ArraySegment)/;
export const keep_fnames = /(dotnetUpdateInternals|dotnetUpdateInternalsSubscriber)/;
export const reserved = [
"Module", "dotnetApi",
"dotnetInternals", "dotnetLogger", "dotnetAssert", "dotnetJSEngine",
"dotnetUpdateInternals", "dotnetUpdateInternalsSubscriber", "dotnetInitializeModule",
"dotnetLoaderExports", "dotnetRuntimeExports", "dotnetBrowserHostExports", "dotnetInteropJSExports", "dotnetNativeBrowserExports", "dotnetBrowserUtilsExports",
];
export const externalDependencies = ["module", "process", "perf_hooks", "node:crypto"];
export const artifactsObjDir = "../../artifacts/obj";
export const isDebug = process.env.Configuration !== "Release";
export let gitHash;
try {
const gitInfo = gitCommitInfo();
gitHash = gitInfo.hash;
} catch (e) {
gitHash = "unknown";
}
export const envConstants = {
productVersion,
configuration,
gitHash,
isContinuousIntegrationBuild,
};