Skip to content

Commit

Permalink
[ENG-9283][eas-cli] Throw error when project tarball exceeds 1GB (#1928)
Browse files Browse the repository at this point in the history
* [ENG-9283][eas-cli] Throw error when project tarball exceeds 1GB

* update CHANGELOG.md

* Update packages/eas-cli/src/build/build.ts

Co-authored-by: Szymon Dziedzic <[email protected]>

* Update packages/eas-cli/src/build/build.ts

Co-authored-by: Szymon Dziedzic <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Szymon Dziedzic <[email protected]>

---------

Co-authored-by: Szymon Dziedzic <[email protected]>
  • Loading branch information
khamilowicz and szdziedzic authored Jul 17, 2023
1 parent 5232641 commit 57dd372
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Limit project file upload size to 2GB. ([#1928](https://github.com/expo/eas-cli/pull/1928) by [@khamilowicz](https://github.com/khamilowicz))

## [3.15.1](https://github.com/expo/eas-cli/releases/tag/v3.15.1) - 2023-07-11

### 🐛 Bug fixes
Expand Down
4 changes: 4 additions & 0 deletions packages/eas-cli/src/build/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ async function uploadProjectAsync<TPlatform extends Platform>(
);
}

if (projectTarball.size > 2 * 1024 * 1024 * 1024) {
throw new Error('Project archive is too big. Maximum allowed size is 2GB.');
}

projectTarballPath = projectTarball.path;

const bucketKey = await uploadFileAtPathToGCSAsync(
Expand Down

0 comments on commit 57dd372

Please sign in to comment.