Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust project bootstrap scripts to be windows-friendly #1870

Merged
merged 13 commits into from
Oct 2, 2023
11 changes: 11 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ runs:
shell: bash

- name: "Bootstrap project"
if: ${{ runner.os != 'Windows' }}
run: |
if [[ ! -z "${{ inputs.bootstrap-packages }}" ]]
then
Expand All @@ -59,3 +60,13 @@ runs:
lerna bootstrap
fi
shell: bash

- name: "Bootstrap project on windows"
if: ${{ runner.os == 'Windows' }}
run: |
if ( "${{ inputs.bootstrap-packages }}" ) {
lerna bootstrap --scope '{${{ inputs.bootstrap-packages }},}'
} else {
lerna bootstrap
}
shell: powershell
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

* Bump github actions/* to versions using node16

* Project can now be bootstraped on Windows (powershell)

* Placeholder(...) for community name

* No unregistered/duplicated label for system messages
Expand Down
5 changes: 5 additions & 0 deletions packages/backend/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have CRLF line endings on checkout.
electron-fetch-git.patch text eol=crlf
18 changes: 18 additions & 0 deletions packages/backend/electron-fetch-git.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/packages/backend/node_modules/electron-fetch/lib/index.js b/packages/backend/node_modules/electron-fetch/lib/index.js
index c9ea590d9..74c0757a8 100644
--- a/packages/backend/node_modules/electron-fetch/lib/index.js
+++ b/packages/backend/node_modules/electron-fetch/lib/index.js
@@ -1283,12 +1283,7 @@ function getNodeRequestOptions(request) {

let electron; // istanbul ignore else

-if (process.versions.electron) {
- electron = require('electron');
-}
-
-const isReady = electron && electron.app && !electron.app.isReady() ? new Promise(resolve => electron.app.once('ready', resolve)) : Promise.resolve();
-
+const isReady = Promise.resolve();
/**
* Fetch function
*
Loading
Loading