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] Add non-interactive flag to eas update command #1066

Merged
merged 4 commits into from
Apr 14, 2022

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Apr 14, 2022

Checklist

  • I've added an entry to CHANGELOG.md if necessary. You can comment this pull request with /changelog-entry [breaking-change|new-feature|bug-fix|chore] [message] and CHANGELOG.md will be updated automatically.

Why

Currently, we might ask a question about if you want to install expo-updates when running EAS CLI, which can break CI. When CI breaks, there's no indication of what we tried to get input for. Just an error.

We need to throw the log before we throw the error, or we need to add a default choice with a --non-interactive flag.

This PR adds the non-interactive flag to be in alignment with the other commands.

Closes ENG-4590.

How

Used #600 as inspiration. Added flag, test manually (there's no tests for this command).

Test Plan

~/expo/eas-cli/packages/eas-cli/bin/run update --non-interactive
✔ Linked to project @wschurman/eas-update-test
    Error: Must supply --branch when in non-interactive mode

~/expo/eas-cli/packages/eas-cli/bin/run update --non-interactive --branch preview
✔ Linked to project @wschurman/eas-update-test
    Error: Must supply --message when in non-interactive mode

~/expo/eas-cli/packages/eas-cli/bin/run update --non-interactive --branch preview --message "wat"
✔ Linked to project @wschurman/eas-update-test
✔ Built bundle!
✔ Uploaded assets!
✔ Published!

branch           preview
runtime version  exposdk:44.0.0
platform         android, ios
update group ID  cf31f7dd-2c25-4c9d-bcc7-352b7e811bc4
message          wat

@wschurman wschurman requested review from byCedric and jonsamp April 14, 2022 01:02
@linear
Copy link

linear bot commented Apr 14, 2022

ENG-4590 Add --non-interactive flag to `eas update`

Currently, we might ask a question about if you want to install expo-updates when running EAS CLI, which can break CI. When CI breaks, there's no indication of what we tried to get input for. Just an error.

We need to throw the log before we throw the error, or we need to add a default choice with a --non-interactive flag.

@wschurman
Copy link
Member Author

/changelog-entry new-feature Add non-interactive flag to eas update command

@github-actions
Copy link

github-actions bot commented Apr 14, 2022

Size Change: +649 B (0%)

Total Size: 25.2 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 25.2 MB +649 B (0%)

compressed-size-action

@codecov
Copy link

codecov bot commented Apr 14, 2022

Codecov Report

Merging #1066 (41e8242) into main (be3a86a) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

❗ Current head 41e8242 differs from pull request most recent head 0861894. Consider uploading reports for the commit 0861894 to get more accurate results

@@            Coverage Diff             @@
##             main    #1066      +/-   ##
==========================================
- Coverage   50.29%   50.26%   -0.03%     
==========================================
  Files         348      348              
  Lines       12707    12708       +1     
  Branches     2439     2443       +4     
==========================================
- Hits         6390     6386       -4     
- Misses       6306     6311       +5     
  Partials       11       11              
Impacted Files Coverage Δ
packages/eas-cli/src/commands/update/index.ts 13.50% <0.00%> (-0.61%) ⬇️
packages/eas-cli/src/submit/utils/errors.ts 63.34% <0.00%> (-1.18%) ⬇️
...eas-cli/src/submit/android/ServiceAccountSource.ts 79.69% <0.00%> (ø)
...s/android/actions/CreateGoogleServiceAccountKey.ts 84.00% <0.00%> (+13.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be3a86a...0861894. Read the comment docs.

packages/eas-cli/src/commands/update/index.ts Outdated Show resolved Hide resolved
packages/eas-cli/src/commands/update/index.ts Outdated Show resolved Hide resolved
@wschurman wschurman requested a review from kbrandwijk April 14, 2022 15:15
@wschurman wschurman merged commit 64c1e47 into main Apr 14, 2022
@wschurman wschurman deleted the @wschurman/non-interactive branch April 14, 2022 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants