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

[eas-cli] send a path to custom build config to EAS Build server with posix separator for Windows #2285

Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🐛 Bug fixes

- Use a custom build config path with POSIX separator when sending data to the EAS Build server. ([#2285](https://github.com/expo/eas-cli/pull/2285) by [@szdziedzic](https://github.com/szdziedzic))

### 🧹 Chores

- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2277](https://github.com/expo/eas-cli/pull/2277) by [@expo-bot](https://github.com/expo-bot))
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/build/android/prepareJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import path from 'path';
import slash from 'slash';

import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider';
import { getCustomBuildConfigPath } from '../../project/customBuildConfig';
import { getCustomBuildConfigPathForJob } from '../../project/customBuildConfig';
import { getUsername } from '../../project/projectUtils';
import { BuildContext } from '../context';

Expand Down Expand Up @@ -54,7 +54,7 @@ export async function prepareJobAsync(
}

const maybeCustomBuildConfigPath = buildProfile.config
? getCustomBuildConfigPath(buildProfile.config)
? getCustomBuildConfigPathForJob(buildProfile.config)
: undefined;

const job: Android.Job = {
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/build/ios/prepareJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import slash from 'slash';

import { IosCredentials, TargetCredentials } from '../../credentials/ios/types';
import { IosJobSecretsInput } from '../../graphql/generated';
import { getCustomBuildConfigPath } from '../../project/customBuildConfig';
import { getCustomBuildConfigPathForJob } from '../../project/customBuildConfig';
import { getUsername } from '../../project/projectUtils';
import { BuildContext } from '../context';

Expand Down Expand Up @@ -46,7 +46,7 @@ export async function prepareJobAsync(
}

const maybeCustomBuildConfigPath = buildProfile.config
Copy link
Contributor

Choose a reason for hiding this comment

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

If the logic here is the same for ios and android maybe in getCustomBuildConfigPath?

Copy link
Contributor

@sjchmiela sjchmiela Mar 18, 2024

Choose a reason for hiding this comment

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

This crossed my mind too, I figured we may want to keep getCustomBuildConfigPath local to current environment, e.g. for eas build --local. I guess prepareJob is the borderline between "we're running on this computer" and "sending this to the server".

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, you are right, we should keep this logic in a single place. Since getCustomBuildConfigPath can be also used in other context than sending the data to the EAS server I created a new function just for preparing this data for the Job object 👍

? getCustomBuildConfigPath(buildProfile.config)
? getCustomBuildConfigPathForJob(buildProfile.config)
: undefined;

const job: Ios.Job = {
Expand Down
4 changes: 4 additions & 0 deletions packages/eas-cli/src/project/customBuildConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ export async function validateCustomBuildConfigAsync({
export function getCustomBuildConfigPath(configFilename: string): string {
return path.join('.eas/build', configFilename);
}

export function getCustomBuildConfigPathForJob(configFilename: string): string {
return path.posix.join('.eas/build', configFilename);
}
Loading