treewide: fix electron-forge console output via the CI env var (#539390)
This commit is contained in:
@@ -40,6 +40,8 @@ buildNpmPackage (finalAttrs: {
|
||||
ONNXRUNTIME_NODE_INSTALL = "skip";
|
||||
ONNXRUNTIME_NODE_INSTALL_CUDA = "skip";
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
CI = "1";
|
||||
};
|
||||
|
||||
makeCacheWritable = true;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
diff --git a/tools/contributors.ts b/tools/contributors.ts
|
||||
index ad085d3..1a30ab4 100644
|
||||
--- a/tools/contributors.ts
|
||||
+++ b/tools/contributors.ts
|
||||
@@ -126,6 +126,7 @@ async function fetchDetailsContributors(
|
||||
}
|
||||
|
||||
async function fetchContributors() {
|
||||
+ return []
|
||||
const response = await fetch(CONTRIBUTORS_URL, { headers: HEADERS });
|
||||
|
||||
if (!response.ok) {
|
||||
@@ -173,10 +174,6 @@ async function fetchAndWriteContributorsFile() {
|
||||
|
||||
try {
|
||||
data = await fetchContributors();
|
||||
-
|
||||
- if (!data || data.length === 0) {
|
||||
- throw new Error('Contributors array is empty');
|
||||
- }
|
||||
} catch (error) {
|
||||
if (process.env.CI) {
|
||||
throw error;
|
||||
@@ -27,6 +27,7 @@ let
|
||||
|
||||
patches = [
|
||||
./dont-use-initial-releases-json.patch
|
||||
./dont-fetch-contributors.patch
|
||||
|
||||
# zip extraction fails on newer nodejs versions without this fix
|
||||
./bump-yauzl.patch
|
||||
@@ -66,6 +67,9 @@ let
|
||||
--replace-fail 'await this.getElectronZipPath(downloadOpts)' '"electron.zip"'
|
||||
'';
|
||||
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
env.CI = "1";
|
||||
|
||||
yarnBuildScript = "package";
|
||||
|
||||
installPhase = ''
|
||||
@@ -101,6 +105,8 @@ buildFHSEnv {
|
||||
inherit pname version;
|
||||
runScript = "${lib.getExe electron} ${unwrapped}/lib/electron-fiddle/resources/app.asar";
|
||||
|
||||
passthru = { inherit unwrapped; };
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p "$out/share/icons/hicolor/scalable/apps"
|
||||
ln -s "${unwrapped}/share/icons/hicolor/scalable/apps/electron-fiddle.svg" "$out/share/icons/hicolor/scalable/apps/"
|
||||
|
||||
@@ -69,6 +69,8 @@ buildNpmPackage.override { inherit nodejs; } rec {
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
# use our own node headers since we skip downloading them
|
||||
NIX_CFLAGS_COMPILE = "-I${nodejs}/include/node";
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
CI = "1";
|
||||
};
|
||||
|
||||
postConfigure = ''
|
||||
|
||||
@@ -244,6 +244,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cp -r static/node_modules resources/node_modules
|
||||
'';
|
||||
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
env.CI = "1";
|
||||
|
||||
yarnBuildScript = "release-electron";
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -191,6 +191,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
env = {
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
CI = "1";
|
||||
|
||||
# on Darwin, cmake uses find_library to locate R instead of using the PATH
|
||||
NIX_LDFLAGS = "-L${R}/lib/R/lib";
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
env.CI = "1";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
|
||||
@@ -97,6 +97,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace node_modules/@electron/packager/dist/packager.js \
|
||||
--replace-fail 'await this.getElectronZipPath(downloadOpts)' '"electron.zip"'
|
||||
|
||||
# electron-forge's console output is squeezed into one narrow column if unset
|
||||
export CI="1";
|
||||
|
||||
yarn run package
|
||||
|
||||
runHook postBuild
|
||||
|
||||
Reference in New Issue
Block a user