Skip to content

Commit 8eb7705

Browse files
authored
fix: update github-token, cliFile, fixup destination on non-ci (#233)
1 parent 77b6379 commit 8eb7705

File tree

7 files changed

+11
-7
lines changed

7 files changed

+11
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ npx @rnef/create-app enterprise
6666

6767
```diff
6868
-// cliFile = file("../../node_modules/react-native/cli.js")
69-
+cliFile = file("../../node_modules/@rnef/cli/src/bin.js")
69+
+cliFile = file("../../node_modules/@rnef/cli/dist/src/bin.js")
7070
```
7171

7272
In `android/settings.gradle` change:

packages/cli/src/lib/checkDeprecatedOptions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ const deprecatedAndroidFlags = [
7474
const deprecatedIosFlags = [
7575
{ old: '--mode', new: '--configuration' },
7676
{ old: '--buildFolder', new: '--build-folder' },
77-
{ old: '--destination', new: '--destinations' },
7877
];
7978

8079
export const checkDeprecatedOptions = (argv: string[]) => {

packages/platform-android/template/.github/workflows/remote-build-android.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ jobs:
3434
with:
3535
sign: true
3636
variant: release
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
3738
keystore-base64: ${{ secrets.KEYSTORE_BASE64 }}
3839
keystore-store-file: ${{ secrets.RNEF_UPLOAD_STORE_FILE }}
3940
keystore-store-password: ${{ secrets.RNEF_UPLOAD_STORE_PASSWORD }}
4041
keystore-key-alias: ${{ secrets.RNEF_UPLOAD_KEY_ALIAS }}
4142
keystore-key-password: ${{ secrets.RNEF_UPLOAD_KEY_PASSWORD }}
42-
43+
4344
build-debug:
4445
runs-on: ubuntu-latest
4546

@@ -60,3 +61,4 @@ jobs:
6061
uses: callstackincubator/android@v1
6162
with:
6263
variant: debug
64+
github-token: ${{ secrets.GITHUB_TOKEN }}

packages/platform-apple-helpers/src/lib/commands/build/buildOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type BuildFlags = {
1111
exportExtraParams?: string[];
1212
exportOptionsPlist?: string;
1313
buildFolder?: string;
14-
destination?: string;
14+
destination?: 'device' | 'simulator';
1515
destinations?: string[];
1616
archive?: boolean;
1717
installPods: boolean;

packages/platform-apple-helpers/src/lib/commands/run/createRun.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const createRun = async (
4949
if (!args.binaryPath && args.remoteCache) {
5050
const cachedBuild = await fetchCachedBuild({
5151
configuration: args.configuration ?? 'Debug',
52-
distribution: args.device ? 'device' : 'simulator', // TODO: replace with better logic
52+
distribution: args.destination ?? (args.device ? 'device' : 'simulator'),
5353
remoteCacheProvider,
5454
root: projectRoot,
5555
fingerprintOptions,
@@ -209,7 +209,6 @@ export const createRun = async (
209209
outro('Success 🎉.');
210210
};
211211

212-
213212
async function selectDevice(devices: Device[], args: RunFlags) {
214213
let device;
215214
if (args.device) {

packages/platform-ios/template/.github/workflows/remote-build-ios.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
uses: callstackincubator/ios@v1
3434
with:
3535
destination: device
36+
github-token: ${{ secrets.GITHUB_TOKEN }}
3637
scheme: SCHEME_FOR_DEVICES # replace with preferred scheme
3738
configuration: Release # replace with preferred configuration
3839
certificate-base64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
@@ -61,5 +62,6 @@ jobs:
6162
uses: callstackincubator/ios@v1
6263
with:
6364
destination: simulator
65+
github-token: ${{ secrets.GITHUB_TOKEN }}
6466
scheme: SCHEME_FOR_SIMULATORS # replace with preferred scheme
6567
configuration: Debug # replace with preferred configuration

website/docs/docs/getting-started/migrating-from-community-cli.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { PackageManagerTabs } from 'rspress/theme';
3939

4040
```groovy title="android/app/build.gradle" {2}
4141
// cliFile = file("../../node_modules/react-native/cli.js")
42-
cliFile = file("../../node_modules/@rnef/cli/src/bin.js")
42+
cliFile = file("../../node_modules/@rnef/cli/dist/src/bin.js")
4343
```
4444

4545
In `android/settings.gradle` change:
@@ -110,6 +110,7 @@ import { PackageManagerTabs } from 'rspress/theme';
110110
uses: ./.github/actions/rnef-remote-build-ios
111111
with:
112112
destination: simulator
113+
github-token: ${{ secrets.GITHUB_TOKEN }}
113114
configuration: Debug
114115
```
115116
@@ -121,6 +122,7 @@ import { PackageManagerTabs } from 'rspress/theme';
121122
uses: ./.github/actions/rnef-remote-build-android
122123
with:
123124
variant: debug
125+
github-token: ${{ secrets.GITHUB_TOKEN }}
124126
```
125127
126128
For more setup options see [GitHub Actions configuration](../remote-cache/github-actions/configuration.md)

0 commit comments

Comments
 (0)