Repository navigation
campaign: build-lane tooling for the first beta (N-20..N-25, N-27) #61
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dec0fc6
campaign: build-lane tooling for the first beta (N-20..N-25, N-27)
krassx fe4cf6c
campaign: run-ios.sh restore and test, build-app 16 KB warn, gitignor…
krassx 6cd6409
campaign: commit the generator steps (lib/ was ignored), review fixes
krassx 7a18ecc
campaign: build-app runs the embed assertion on simulator builds too
krassx 27bfbff
campaign: launch-check reads single-quoted applicationId (Expo), poin…
krassx 9ca037d
campaign: review round 2
krassx a3c0c2f
campaign: launch-check counts only this launch's status=2; windows jo…
krassx 1246226
Android: Hermes release builds on Windows hosts (Task 13.7, BLK-07) (…
krassx 292fc62
campaign: the Windows Hermes job is a required proof now that BLK-07 …
krassx c460da8
campaign: gate the iOS embed check on Node 22.18; bound the emulator …
krassx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| # cmd.exe misreads batch files with bare LF line ends (labels, long lines). | ||
| *.cmd text eol=crlf | ||
| # Shell scripts run on macOS and Linux only; a CRLF would break the shebang. | ||
| *.sh text eol=lf |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,8 +1,107 @@ | ||
| /** | ||
| * The Expo example (N-20): launches Bugsee and prints the markers the device | ||
| * e2e and scripts/campaign/launch-check.sh read, as examples/bare does: | ||
| * | ||
| * BUGSEE_E2E launching on <os> rn=<x.y.z> engine=<hermes|jsc> scenario=<name> | ||
| * BUGSEE_E2E status=<n> (<name>) | ||
| * | ||
| * Credentials: campaign-config.json beside this file, which holds only the | ||
| * placeholder token and the dead endpoint. Never a real token. | ||
| * | ||
| * The scenario comes from the e2e deep link | ||
| * `bugsee-e2e://scenario/<name>?nonce=<hex>` (app.json `scheme`), the channel | ||
| * examples/bare uses on Android. `launch` is the default. The N-01 smoke | ||
| * scenarios register in SCENARIOS below (additive edits only). | ||
| */ | ||
| /* global setInterval, clearInterval */ | ||
| const React = require('react'); | ||
| const { Text, View } = require('react-native'); | ||
| const { Linking, Platform, Text, View } = require('react-native'); | ||
| const Bugsee = require('@bugsee/react-native'); | ||
|
|
||
| const { default: bugsee, BugseeLaunchOptions, Status, createDefaultLaunchOptions } = Bugsee; | ||
|
|
||
| const config = require('./campaign-config.json'); | ||
|
|
||
| const STATUS_NAMES = { | ||
| [Status.Stopped]: 'Stopped', | ||
| [Status.Launching]: 'Launching', | ||
| [Status.Launched]: 'Launched', | ||
| [Status.Stopping]: 'Stopping', | ||
| }; | ||
|
|
||
| /** Scenario name -> async (nonce) => void, run once Launched. */ | ||
| const SCENARIOS = { | ||
| launch: async () => undefined, | ||
| }; | ||
|
|
||
| const SCENARIO_URI = /^bugsee-e2e:\/\/scenario\/([\w-]+)\?nonce=([0-9a-f]+)/; | ||
|
|
||
| async function chooseScenario() { | ||
| const uri = await Linking.getInitialURL().catch(() => null); | ||
| const match = uri == null ? null : SCENARIO_URI.exec(uri); | ||
| return match ? { scenario: match[1], nonce: match[2] } : { scenario: 'launch', nonce: '-' }; | ||
| } | ||
|
|
||
| function engine() { | ||
| return globalThis.HermesInternal ? 'hermes' : 'jsc'; | ||
| } | ||
|
|
||
| function App() { | ||
| return React.createElement(View, null, React.createElement(Text, null, 'Bugsee Expo')); | ||
| const [status, setStatus] = React.useState(Status.Stopped); | ||
|
|
||
| React.useEffect(() => { | ||
| let last = -1; | ||
| let cancelled = false; | ||
| const poll = setInterval(() => { | ||
| bugsee | ||
| .getStatus() | ||
| .then((next) => { | ||
| if (!cancelled && next !== last) { | ||
| last = next; | ||
| setStatus(next); | ||
| console.log(`BUGSEE_E2E status=${next} (${STATUS_NAMES[next]})`); | ||
| } | ||
| }) | ||
| .catch(() => undefined); | ||
| }, 100); | ||
|
|
||
| (async () => { | ||
| const { scenario, nonce } = await chooseScenario(); | ||
| const rn = Platform.constants.reactNativeVersion; | ||
| console.log( | ||
| `BUGSEE_E2E launching on ${Platform.OS} rn=${rn.major}.${rn.minor}.${rn.patch} ` + | ||
| `engine=${engine()} scenario=${scenario}`, | ||
| ); | ||
| const options = createDefaultLaunchOptions(); | ||
| options.endpoint = config.endpoint; | ||
| const token = Platform.OS === 'ios' ? config.ios : config.android; | ||
| try { | ||
| const ok = await bugsee.launch(token, BugseeLaunchOptions.serialize(options)); | ||
| console.log(`BUGSEE_E2E launch() resolved ${ok}`); | ||
| } catch (e) { | ||
| console.log(`BUGSEE_E2E launch() rejected ${e instanceof Error ? e.message : String(e)}`); | ||
| return; | ||
| } | ||
| const run = SCENARIOS[scenario]; | ||
| if (run === undefined) { | ||
| console.log(`BUGSEE_E2E unknown scenario ${scenario}`); | ||
| return; | ||
| } | ||
| await run(nonce); | ||
| console.log(`BUGSEE_E2E scenario ${scenario} done nonce=${nonce}`); | ||
| })(); | ||
|
|
||
| return () => { | ||
| cancelled = true; | ||
| clearInterval(poll); | ||
| }; | ||
| }, []); | ||
|
|
||
| return React.createElement( | ||
| View, | ||
| { style: { flex: 1, alignItems: 'center', justifyContent: 'center' } }, | ||
| React.createElement(Text, null, `Bugsee Expo: ${STATUS_NAMES[status]}`), | ||
| ); | ||
| } | ||
|
|
||
| module.exports = App; |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| }, | ||
| "plugins": [ | ||
| "@bugsee/react-native" | ||
| ] | ||
| ], | ||
| "scheme": "bugsee-e2e" | ||
| } | ||
| } | ||
This file contains hidden or 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,5 @@ | ||
| { | ||
| "ios": "00000000-0000-4000-8000-000000000000", | ||
| "android": "00000000-0000-4000-8000-000000000000", | ||
| "endpoint": "https://127.0.0.1:9" | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.