Skip to content

Commit

Permalink
Adjust project bootstrap scripts to be windows-friendly (#1870)
Browse files Browse the repository at this point in the history
* Adjust project bootstrap scripts to be windows-friendly
* Add readme note on running dev desktop on windows
  • Loading branch information
EmiM committed Oct 2, 2023
1 parent 6665f85 commit ced2181
Show file tree
Hide file tree
Showing 11 changed files with 37,201 additions and 37,085 deletions.
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 @@ -10,6 +10,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

0 comments on commit ced2181

Please sign in to comment.