You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Tools: Fix Windows build and improve CI error handling
This commit is contained in:
16
.github/workflows/github-actions-main.yml
vendored
16
.github/workflows/github-actions-main.yml
vendored
@ -86,10 +86,20 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
IS_CONTINUOUS_INTEGRATION: 1
|
IS_CONTINUOUS_INTEGRATION: 1
|
||||||
BUILD_SEQUENCIAL: 1
|
BUILD_SEQUENCIAL: 1
|
||||||
|
# To ensure that the operations stop on failure, all commands
|
||||||
|
# should be on one line with "&&" in between.
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install && cd packages/app-desktop && yarn run dist
|
||||||
cd packages/app-desktop
|
|
||||||
yarn run dist
|
# Build and package the Windows app, without publishing it, just to
|
||||||
|
# verify that the build process hasn't been broken.
|
||||||
|
- name: Build Windows app (no publishing)
|
||||||
|
if: runner.os == 'Windows' && !startsWith(github.ref, 'refs/tags/v')
|
||||||
|
env:
|
||||||
|
IS_CONTINUOUS_INTEGRATION: 1
|
||||||
|
BUILD_SEQUENCIAL: 1
|
||||||
|
run: |
|
||||||
|
yarn install && cd packages/app-desktop && yarn run dist --publish=never
|
||||||
|
|
||||||
ServerDockerImage:
|
ServerDockerImage:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -30,7 +30,10 @@ function convertJsx(path) {
|
|||||||
|
|
||||||
if (fileIsNewerThan(jsxPath, jsPath)) {
|
if (fileIsNewerThan(jsxPath, jsPath)) {
|
||||||
console.info(`Compiling ${jsxPath}...`);
|
console.info(`Compiling ${jsxPath}...`);
|
||||||
const result = spawnSync('yarn', ['run', 'babel', '--presets', 'react', '--out-file', jsPath, jsxPath]);
|
|
||||||
|
// { shell: true } is needed to get it working on Windows:
|
||||||
|
// https://discourse.joplinapp.org/t/attempting-to-build-on-windows/22559/12
|
||||||
|
const result = spawnSync('yarn', ['run', 'babel', '--presets', 'react', '--out-file', jsPath, jsxPath], { shell: true });
|
||||||
if (result.status !== 0) {
|
if (result.status !== 0) {
|
||||||
const msg = [];
|
const msg = [];
|
||||||
if (result.stdout) msg.push(result.stdout.toString());
|
if (result.stdout) msg.push(result.stdout.toString());
|
||||||
|
Reference in New Issue
Block a user