From 599e6b37be4617bc373ac5688b2d6461709f0ca2 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:28:18 -0400 Subject: [PATCH] add warning to macos debug and document flag example --- README.md | 8 ++++++++ src/cordova/setup.action.mjs | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 41b4b21971..2f9621c16f 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,14 @@ npm run action src/www/storybook > > to your shell, then try `outline www/start`! +## Passing configuration flags to actions + +Certain actions take configuration flags - but since we're running them through `npm`, you'll have to use the `--` seperator to funnel them through to the underlying process. For example, to set up a MacOS project in release mode, you'd run: + +```sh +npm run acition cordova/setup macos -- --buildMode=release +``` + ## Life of a Packet [How does the Outline Client work?](docs/life_of_a_packet.md) diff --git a/src/cordova/setup.action.mjs b/src/cordova/setup.action.mjs index ce4ae5c88f..06fc3383ad 100644 --- a/src/cordova/setup.action.mjs +++ b/src/cordova/setup.action.mjs @@ -25,6 +25,7 @@ import {getRootDir} from '../build/get_root_dir.mjs'; import {runAction} from '../build/run_action.mjs'; import {getBuildParameters} from '../build/get_build_parameters.mjs'; import {spawnStream} from '../build/spawn_stream.mjs'; +import chalk from 'chalk'; const WORKING_CORDOVA_OSX_COMMIT = '07e62a53aa6a8a828fd988bc9e884c38c3495a67'; @@ -142,6 +143,10 @@ async function appleMacOsDebug(verbose) { throw new Error('Building an Apple binary requires xcodebuild and can only be done on MacOS'); } + console.warn( + chalk.yellow('Debug mode on the MacOS client is currently broken. Try running with `--buildMode=release` instead.') + ); + await cordova.platform('add', [`github:apache/cordova-osx#${WORKING_CORDOVA_OSX_COMMIT}`], {save: false}); await cordova.prepare({