-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
66 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ea | ||
|
||
if [[ "$VERBOSE" =~ 1|on|On|Yes|yes|true|True ]]; then | ||
set +x | ||
export DEBUG='electron-forge:*,electron-packager,electron-rebuild' | ||
fi | ||
|
||
case "$(uname -s)" in | ||
"Linux") | ||
npm run make -- --arch=x64 | ||
;; | ||
"Darwin") | ||
npm run make -- --arch=x64,arm64 | ||
;; | ||
"Windows"*|"MINGW"*|"MSYS"*) | ||
# Plain `npm run make` fails on windows but seems to work when invoked via powershell. | ||
# However, it does *not* work when powershell is invoked from here, and I can't be | ||
# bothered to dig deeper. It is what it is. | ||
# The failure has to do with node-gyp failing to find the node to build against. | ||
# FIXME: figure out how to conditionally pass $DEBUG to powershell | ||
npm run _make-all-windows | ||
;; | ||
esac | ||
|
||
# collect all artifacts from subdirectories under a common top-level directory | ||
mkdir -p dist | ||
find ./out/make -type f \( \ | ||
-iname "*.zip" -o \ | ||
-iname "*.dmg" -o \ | ||
-iname "*.rpm" -o \ | ||
-iname "*.deb" -o \ | ||
-iname "*.AppImage" -o \ | ||
-iname "*Setup.exe" \ | ||
\) -ls -exec cp '{}' dist/ \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ea | ||
|
||
if [[ "$VERBOSE" =~ 1|on|On|Yes|yes|true|True ]]; then | ||
set +x | ||
export DEBUG='electron-forge:*,electron-packager,electron-rebuild' | ||
fi | ||
|
||
npm run package | ||
npm run lint | ||
|
||
case "$(uname -s)" in | ||
"Linux") | ||
xvfb-run --auto-servernum npm run test-gui && xvfb-run --auto-servernum npm run test-shared | ||
;; | ||
"Darwin") | ||
npm run test-gui && npm run test-shared | ||
;; | ||
"Windows"*|"MINGW"*|"MSYS"*) | ||
npm run test-gui && npm run test-shared | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,13 @@ | |
"url": "[email protected]:balena-io/etcher.git" | ||
}, | ||
"scripts": { | ||
"_make-all-windows": "@powershell -Command 'npm run make -- --arch=ia32,x64'", | ||
"lint-css": "prettier --write lib/**/*.css", | ||
"lint-ts": "balena-lint --fix --typescript typings lib tests webpack.config.ts", | ||
"lint": "npm run lint-ts && npm run lint-css", | ||
"test-gui": "electron-mocha --recursive --reporter spec --window-config tests/gui/window-config.json --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox --renderer tests/gui/**/*.ts", | ||
"test-shared": "electron-mocha --recursive --reporter spec --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox tests/shared/**/*.ts", | ||
"test-windows": "npm run lint && npm run test-gui && npm run test-shared", | ||
"test-macos": "npm run lint && npm run test-gui && npm run test-shared", | ||
"test-linux": "npm run lint && xvfb-run --auto-servernum npm run test-gui && xvfb-run --auto-servernum npm run test-shared", | ||
"test": "echo npm run test-{linux,windows,macos}", | ||
"test": "build/test-all.sh", | ||
"package": "electron-forge package", | ||
"start": "electron-forge start", | ||
"make": "electron-forge make" | ||
|