Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(devtools): add warning to macos debug and document flag passthrough example #1661

Merged
merged 7 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
SENTRY_DSN=<your sentry dsn> npm run action cordova/setup macos -- --buildMode=release --versionName=<your version name>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I added a command to the Apple readme that people can copy and past as-is: https://github.com/Jigsaw-Code/outline-client/blob/fortuna-readme/src/cordova/apple/README.md#set-up-xcode-project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

```

## Life of a Packet

[How does the Outline Client work?](docs/life_of_a_packet.md)
Expand Down
5 changes: 5 additions & 0 deletions src/cordova/setup.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -140,6 +141,10 @@ async function appleMacOsDebug(verbose) {
throw new Error('Building an Apple binary requires xcodebuild and can only be done on MacOS');
}

console.warn(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does debug mode work on Intel? If so, perhaps we output this only for non-intel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's on everything :/ Because console.assert is bugged on the deprecated web view

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({
Expand Down
Loading