Skip to content

Commit d02aa94

Browse files
committed
Merge branch 'main' into @evanbacon/submit/fix-testflight-group
2 parents fd15853 + 918a7f9 commit d02aa94

File tree

16 files changed

+213
-107
lines changed

16 files changed

+213
-107
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
notify-slack:
5454
runs-on: ubuntu-latest
55-
needs: test
55+
needs: [test]
5656
name: Notify Slack
5757
if: ${{ github.ref == 'refs/heads/main' && always() }}
5858
steps:

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ This is the log of notable changes to EAS CLI and related packages.
1414

1515
### 🧹 Chores
1616

17+
- Narrow amount of data queried for basic update channel operations. ([#2901](https://github.com/expo/eas-cli/pull/2901) by [@wschurman](https://github.com/wschurman))
18+
19+
## [15.0.10](https://github.com/expo/eas-cli/releases/tag/v15.0.10) - 2025-02-11
20+
21+
### 🐛 Bug fixes
22+
23+
- Fix files deleted in working directory not being removed from the project archive when `requireCommit` is false. ([#2900](https://github.com/expo/eas-cli/pull/2900) by [@sjchmiela](https://github.com/sjchmiela))
24+
1725
## [15.0.9](https://github.com/expo/eas-cli/releases/tag/v15.0.9) - 2025-02-09
1826

1927
### 🐛 Bug fixes

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"npmClient": "yarn",
3-
"version": "15.0.9",
3+
"version": "15.0.10",
44
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
55
}

packages/eas-cli/README.md

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.

packages/eas-cli/graphql.schema.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/eas-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "eas-cli",
33
"description": "EAS command line tool",
4-
"version": "15.0.9",
4+
"version": "15.0.10",
55
"author": "Expo <[email protected]>",
66
"bin": {
77
"eas": "./bin/run"

packages/eas-cli/src/channel/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export async function doesChannelExistAsync(
289289
{ appId, channelName }: { appId: string; channelName: string }
290290
): Promise<boolean> {
291291
try {
292-
await ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
292+
await ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
293293
appId,
294294
channelName,
295295
});

packages/eas-cli/src/commands/channel/delete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class ChannelDelete extends EasCommand {
5252

5353
let channelId, channelName;
5454
if (nameArg) {
55-
const { id, name } = await ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
55+
const { id, name } = await ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
5656
appId: projectId,
5757
channelName: nameArg,
5858
});

packages/eas-cli/src/commands/channel/edit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default class ChannelEdit extends EasCommand {
9494
}
9595

9696
const existingChannel = args.name
97-
? await ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
97+
? await ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
9898
appId: projectId,
9999
channelName: args.name,
100100
})

packages/eas-cli/src/commands/channel/pause.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default class ChannelPause extends EasCommand {
8686
}
8787

8888
const existingChannel = args.name
89-
? await ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
89+
? await ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
9090
appId: projectId,
9191
channelName: args.name,
9292
})

packages/eas-cli/src/commands/channel/resume.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default class ChannelResume extends EasCommand {
8686
}
8787

8888
const existingChannel = args.name
89-
? await ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
89+
? await ChannelQuery.viewUpdateChannelBasicInfoAsync(graphqlClient, {
9090
appId: projectId,
9191
channelName: args.name,
9292
})

packages/eas-cli/src/graphql/generated.ts

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/eas-cli/src/graphql/queries/ChannelQuery.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { withErrorHandlingAsync } from '../client';
77
import {
88
UpdateBranchBasicInfoFragment,
99
UpdateFragment,
10+
ViewUpdateChannelBasicInfoOnAppQuery,
11+
ViewUpdateChannelBasicInfoOnAppQueryVariables,
1012
ViewUpdateChannelOnAppQuery,
1113
ViewUpdateChannelOnAppQueryVariables,
1214
ViewUpdateChannelsOnAppQuery,
@@ -41,6 +43,42 @@ export function composeUpdateBranchObject(
4143
}
4244

4345
export const ChannelQuery = {
46+
async viewUpdateChannelBasicInfoAsync(
47+
graphqlClient: ExpoGraphqlClient,
48+
{ appId, channelName }: ViewUpdateChannelBasicInfoOnAppQueryVariables
49+
): Promise<
50+
NonNullable<ViewUpdateChannelBasicInfoOnAppQuery['app']['byId']['updateChannelByName']>
51+
> {
52+
const response = await withErrorHandlingAsync(
53+
graphqlClient
54+
.query<ViewUpdateChannelBasicInfoOnAppQuery, ViewUpdateChannelBasicInfoOnAppQueryVariables>(
55+
gql`
56+
query ViewUpdateChannelBasicInfoOnApp($appId: String!, $channelName: String!) {
57+
app {
58+
byId(appId: $appId) {
59+
id
60+
updateChannelByName(name: $channelName) {
61+
id
62+
...UpdateChannelBasicInfoFragment
63+
}
64+
}
65+
}
66+
}
67+
${print(UpdateChannelBasicInfoFragmentNode)}
68+
`,
69+
{ appId, channelName },
70+
{ additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] }
71+
)
72+
.toPromise()
73+
);
74+
75+
const { updateChannelByName } = response.app.byId;
76+
if (!updateChannelByName) {
77+
throw new ChannelNotFoundError(`Could not find channel with the name ${channelName}`);
78+
}
79+
80+
return updateChannelByName;
81+
},
4482
async viewUpdateChannelAsync(
4583
graphqlClient: ExpoGraphqlClient,
4684
{ appId, channelName, filter }: ViewUpdateChannelOnAppQueryVariables

packages/eas-cli/src/project/customBuildConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function validateCustomBuildConfigAsync({
3737
throw new Error(
3838
`Custom build configuration file ${chalk.bold(
3939
relativeConfigPath
40-
)} is ignored by your version control system. Remove it from the ignore list to successfully create custom build.`
40+
)} is ignored by your version control system or .easignore. Remove it from the ignore list to successfully create custom build.`
4141
);
4242
}
4343

packages/eas-cli/src/vcs/clients/__tests__/git.test.ts

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,31 +131,78 @@ describe('git', () => {
131131
);
132132
});
133133
});
134+
135+
it('is able to delete a submodule ignored by .easignore', async () => {
136+
const repoRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
137+
await spawnAsync('git', ['init'], { cwd: repoRoot });
138+
const vcs = new GitClient({
139+
requireCommit: false,
140+
maybeCwdOverride: repoRoot,
141+
});
142+
143+
await spawnAsync(
144+
'git',
145+
['submodule', 'add', 'https://github.com/expo/results.git', 'results'],
146+
{ cwd: repoRoot }
147+
);
148+
await spawnAsync('git', ['add', 'results'], { cwd: repoRoot });
149+
await spawnAsync('git', ['commit', '-m', 'add submodule'], { cwd: repoRoot });
150+
151+
const repoCloneNonIgnored = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
152+
await expect(vcs.makeShallowCopyAsync(repoCloneNonIgnored)).resolves.not.toThrow();
153+
await expect(fs.stat(path.join(repoCloneNonIgnored, 'results'))).resolves.not.toThrow();
154+
155+
await fs.writeFile(`${repoRoot}/.easignore`, 'results');
156+
const repoCloneIgnored = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
157+
await expect(vcs.makeShallowCopyAsync(repoCloneIgnored)).resolves.not.toThrow();
158+
await expect(fs.stat(path.join(repoCloneIgnored, 'results'))).rejects.toThrow('ENOENT');
159+
});
134160
});
135161

136-
it('is able to delete a submodule ignored by .easignore', async () => {
162+
it('does not include files that have been removed in the working directory', async () => {
137163
const repoRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
138164
await spawnAsync('git', ['init'], { cwd: repoRoot });
139165
const vcs = new GitClient({
140166
requireCommit: false,
141167
maybeCwdOverride: repoRoot,
142168
});
143169

144-
await spawnAsync(
145-
'git',
146-
['submodule', 'add', 'https://github.com/expo/results.git', 'results'],
147-
{ cwd: repoRoot }
170+
await fs.writeFile(`${repoRoot}/committed-file.txt`, 'file');
171+
await fs.writeFile(`${repoRoot}/file-to-remove.txt`, 'file');
172+
await spawnAsync('git', ['add', 'committed-file.txt', 'file-to-remove.txt'], {
173+
cwd: repoRoot,
174+
});
175+
await spawnAsync('git', ['commit', '-m', 'add files'], { cwd: repoRoot });
176+
177+
await fs.rm(`${repoRoot}/file-to-remove.txt`);
178+
await spawnAsync('git', ['add', 'file-to-remove.txt'], { cwd: repoRoot });
179+
await spawnAsync('git', ['commit', '-m', 'remove file'], { cwd: repoRoot });
180+
181+
await fs.writeFile(`${repoRoot}/new-file.txt`, 'file');
182+
await fs.writeFile(`${repoRoot}/new-tracked-file.txt`, 'file');
183+
184+
const repoClone = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
185+
await expect(vcs.makeShallowCopyAsync(repoClone)).resolves.not.toThrow();
186+
await expect(fs.stat(path.join(repoClone, 'file-to-remove.txt'))).rejects.toThrow('ENOENT');
187+
await expect(fs.stat(path.join(repoClone, 'committed-file.txt'))).resolves.not.toThrow();
188+
await expect(fs.stat(path.join(repoClone, 'new-file.txt'))).resolves.not.toThrow();
189+
await expect(fs.stat(path.join(repoClone, 'new-tracked-file.txt'))).resolves.not.toThrow();
190+
191+
vcs.requireCommit = true;
192+
await spawnAsync('git', ['add', '.'], { cwd: repoRoot });
193+
await spawnAsync('git', ['commit', '-m', 'tmp commit'], { cwd: repoRoot });
194+
195+
const requireCommitClone = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
196+
await expect(vcs.makeShallowCopyAsync(requireCommitClone)).resolves.not.toThrow();
197+
await expect(fs.stat(path.join(requireCommitClone, 'file-to-remove.txt'))).rejects.toThrow(
198+
'ENOENT'
148199
);
149-
await spawnAsync('git', ['add', 'results'], { cwd: repoRoot });
150-
await spawnAsync('git', ['commit', '-m', 'add submodule'], { cwd: repoRoot });
151-
152-
const repoCloneNonIgnored = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
153-
await expect(vcs.makeShallowCopyAsync(repoCloneNonIgnored)).resolves.not.toThrow();
154-
await expect(fs.stat(path.join(repoCloneNonIgnored, 'results'))).resolves.not.toThrow();
155-
156-
await fs.writeFile(`${repoRoot}/.easignore`, 'results');
157-
const repoCloneIgnored = await fs.mkdtemp(path.join(os.tmpdir(), 'eas-cli-git-test-'));
158-
await expect(vcs.makeShallowCopyAsync(repoCloneIgnored)).resolves.not.toThrow();
159-
await expect(fs.stat(path.join(repoCloneIgnored, 'results'))).rejects.toThrow('ENOENT');
200+
await expect(
201+
fs.stat(path.join(requireCommitClone, 'committed-file.txt'))
202+
).resolves.not.toThrow();
203+
await expect(fs.stat(path.join(requireCommitClone, 'new-file.txt'))).resolves.not.toThrow();
204+
await expect(
205+
fs.stat(path.join(requireCommitClone, 'new-tracked-file.txt'))
206+
).resolves.not.toThrow();
160207
});
161208
});

packages/eas-cli/src/vcs/clients/git.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,19 @@ export default class GitClient extends Client {
182182
await setGitCaseSensitivityAsync(true, rootPath);
183183
await spawnAsync(
184184
'git',
185-
['clone', '--no-hardlinks', '--depth', '1', gitRepoUri, destinationPath],
185+
[
186+
'clone',
187+
// If we do not require a commit, we are going to later
188+
// copy the working directory into the destination path,
189+
// so we can skip the checkout step (which also adds files
190+
// that have been removed in the working directory).
191+
this.requireCommit ? null : '--no-checkout',
192+
'--no-hardlinks',
193+
'--depth',
194+
'1',
195+
gitRepoUri,
196+
destinationPath,
197+
].flatMap(e => e ?? []),
186198
{ cwd: rootPath }
187199
);
188200

0 commit comments

Comments
 (0)