mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
put scratch-gui install into scratch-desktop postinstall
This commit is contained in:
parent
2cfca4c0ff
commit
245a3ec0d7
3 changed files with 25 additions and 28 deletions
|
@ -3,33 +3,13 @@ workflows:
|
|||
macos:
|
||||
jobs:
|
||||
- build_for_macos:
|
||||
context: code-sign-generic
|
||||
context: code-sign-macOS
|
||||
windows:
|
||||
jobs:
|
||||
- build_for_windows:
|
||||
context: code-sign-generic
|
||||
orbs:
|
||||
windows: circleci/windows@2.2.0
|
||||
commands:
|
||||
shared_build_steps:
|
||||
description: "The build steps which are the same on all platforms. Does not include 'checkout'"
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
- npm-cache-{{ arch }}-{{ checksum "package-lock.json" }}
|
||||
- run:
|
||||
name: Install scratch-desktop dependencies
|
||||
command: npm ci
|
||||
- save_cache: # save cache BEFORE doing anything special with scratch-gui
|
||||
paths:
|
||||
- node_modules/
|
||||
key: npm-cache-{{ arch }}-{{ checksum "package-lock.json" }}
|
||||
- run:
|
||||
name: Install scratch-gui dependencies
|
||||
command: cd node_modules/scratch-gui && npm install
|
||||
- run:
|
||||
name: Build
|
||||
command: npm run dist
|
||||
jobs:
|
||||
build_for_macos:
|
||||
macos:
|
||||
|
@ -58,3 +38,23 @@ jobs:
|
|||
mv dist/{Scratch*.appx,Scratch*.exe} Artifacts/
|
||||
- store_artifacts:
|
||||
path: Artifacts/
|
||||
commands:
|
||||
shared_build_steps:
|
||||
description: The build steps which are the same on all platforms. Does not include 'checkout'
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
- npm-cache-{{ arch }}-{{ checksum "package-lock.json" }}
|
||||
- run:
|
||||
name: Print NPM cache root
|
||||
command: npm config get cache
|
||||
- run:
|
||||
name: Install scratch-desktop dependencies
|
||||
command: npm ci
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
key: npm-cache-{{ arch }}-{{ checksum "package-lock.json" }}
|
||||
- run:
|
||||
name: Build
|
||||
command: npm run dist
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
"version": "3.12.0",
|
||||
"license": "BSD-3-Clause",
|
||||
"scripts": {
|
||||
"postinstall": "node ./scripts/npm-in-gui.js install",
|
||||
"start": "electron-webpack dev --bail --display-error-details --env.minify=false",
|
||||
"build-gui": "node ./scripts/run-in-gui.js build",
|
||||
"watch-gui": "node ./scripts/run-in-gui.js watch",
|
||||
"delete-gui": "rimraf ./node_modules/scratch-gui",
|
||||
"install-gui": "cd ./node_modules/scratch-gui && npm i",
|
||||
"clean": "rimraf ./dist/ ./static/assets/",
|
||||
"build-gui": "node ./scripts/npm-in-gui.js run build",
|
||||
"watch-gui": "node ./scripts/npm-in-gui.js run watch",
|
||||
"clean": "rimraf ./dist ./static/assets ./node_modules/scratch-gui/build ./node_modules/scratch-gui/dist",
|
||||
"compile": "rimraf ./dist/ && electron-webpack --bail --display-error-details --env.minify=false",
|
||||
"fetch": "rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js",
|
||||
"dist": "npm run build-gui && npm run fetch && npm run compile -p && node ./scripts/electron-builder-wrapper.js",
|
||||
|
|
|
@ -3,8 +3,6 @@ const path = require('path');
|
|||
|
||||
// process.argv: ['node', 'run-in-gui.js', 'foo', ...]
|
||||
const args = process.argv.slice(2);
|
||||
args.unshift('run');
|
||||
// args: ['run', 'foo', ...]
|
||||
|
||||
// copy environment (including PATH) then add or replace BUILD_MODE and STATIC_PATH
|
||||
const env = {
|
Loading…
Reference in a new issue