mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-13 20:28:08 -10:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
377c7a9ebb | ||
|
|
ef3edcc787 |
No files matched your search
@@ -69,22 +69,16 @@ jobs:
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 20
|
||||
- run: brew install python-setuptools
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
- run: yarn install --frozen-lockfile --check-files
|
||||
- run: yarn build
|
||||
- name: Build tarballs
|
||||
working-directory: ${{ github.workspace }}/packages/eas-cli
|
||||
run: |
|
||||
yarn pretarball-ci
|
||||
yarn oclif pack:tarballs --no-xz --targets darwin-x64,darwin-arm64
|
||||
yarn oclif pack:tarballs --no-xz --targets darwin-x64
|
||||
- id: x64
|
||||
run: echo "filename=$(ls eas-*-x64.tar.gz)" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.workspace }}/packages/eas-cli/dist
|
||||
- id: arm64
|
||||
run: echo "filename=$(ls eas-*-arm64.tar.gz)" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.workspace }}/packages/eas-cli/dist
|
||||
- name: Upload darwin-x64 tarball
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
@@ -94,15 +88,6 @@ jobs:
|
||||
asset_path: packages/eas-cli/dist/${{ steps.x64.outputs.filename }}
|
||||
asset_name: ${{ steps.x64.outputs.filename }}
|
||||
asset_content_type: application/gzip
|
||||
- name: Upload darwin-arm64 tarball
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||
asset_path: packages/eas-cli/dist/${{ steps.arm64.outputs.filename }}
|
||||
asset_name: ${{ steps.arm64.outputs.filename }}
|
||||
asset_content_type: application/gzip
|
||||
build-windows:
|
||||
name: Build for Windows
|
||||
runs-on: ubuntu-latest
|
||||
@@ -167,13 +152,7 @@ jobs:
|
||||
VERSION=$(cat lerna.json | jq -r .version)
|
||||
echo //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN > ~/.npmrc
|
||||
npm dist-tag add eas-cli@$VERSION latest-eas-build-staging
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
||||
- name: Add latest-eas-build tag
|
||||
run: |
|
||||
VERSION=$(cat lerna.json | jq -r .version)
|
||||
echo //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN > ~/.npmrc
|
||||
npm dist-tag add eas-cli@$VERSION latest-eas-build
|
||||
echo "Run \"npm dist-tag add eas-cli@$VERSION latest-eas-build\" to promote it to production."
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
||||
release-changelog:
|
||||
@@ -226,22 +205,3 @@ jobs:
|
||||
SLACK_USERNAME: 'EAS CLI CI'
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_FOOTER: ''
|
||||
open-pr-in-universe:
|
||||
name: Open a PR with `@expo/eas-json` bump in universe
|
||||
needs: publish-to-npm
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
eas-json:
|
||||
- 'packages/eas-json/**'
|
||||
- name: Open a PR with `@expo/eas-json` version bump in universe
|
||||
if: steps.filter.outputs.eas-json == 'true'
|
||||
uses: benc-uk/workflow-dispatch@v1
|
||||
with:
|
||||
repo: expo/universe
|
||||
ref: main
|
||||
workflow: update-eas-json.yml
|
||||
token: ${{ secrets.EXPO_BOT_PAT }}
|
||||
@@ -1,81 +0,0 @@
|
||||
name: Open a PR bumping eas-build modules
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
open-pr:
|
||||
name: Open a PR bumping eas-build modules
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
token: ${{ secrets.EXPO_BOT_PAT }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config --global user.email "[email protected]"
|
||||
git config --global user.name "Expo Bot"
|
||||
|
||||
- name: Upgrade eas-build modules
|
||||
run: |
|
||||
for DIR in packages/eas-cli packages/eas-json; do
|
||||
pushd $DIR >/dev/null 2>&1
|
||||
# packages are ordered according to output of `lerna list --toposort`
|
||||
# https://github.com/expo/turtle-v2/pull/568
|
||||
for PACKAGE in "@expo/downloader" "@expo/eas-build-job" "@expo/logger" "@expo/template-file" "@expo/steps" "@expo/turtle-spawn" "@expo/build-tools"; do
|
||||
if grep -q $PACKAGE package.json; then
|
||||
echo "[$DIR] yarn --exact add $PACKAGE"
|
||||
yarn add --exact $PACKAGE
|
||||
fi
|
||||
done
|
||||
popd >/dev/null 2>&1
|
||||
done
|
||||
|
||||
- name: Set a branch name
|
||||
id: bump-branch-name
|
||||
run: |
|
||||
HASH="$(echo $RANDOM | md5sum | head -c 10)"
|
||||
BRANCH_NAME="@expo-bot/eas-build-bump-$HASH"
|
||||
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create a branch, commit, and push
|
||||
run: |
|
||||
BRANCH_NAME="${{ steps.bump-branch-name.outputs.BRANCH_NAME }}"
|
||||
|
||||
git checkout -b $BRANCH_NAME
|
||||
git add .
|
||||
git commit -m "Upgrade eas-build dependencies"
|
||||
git push origin $BRANCH_NAME
|
||||
|
||||
- name: Open a PR to main
|
||||
uses: repo-sync/pull-request@v2
|
||||
id: open-pr
|
||||
with:
|
||||
source_branch: '${{ steps.bump-branch-name.outputs.BRANCH_NAME }}'
|
||||
destination_branch: 'main'
|
||||
pr_title: 'Upgrade eas-build dependencies'
|
||||
pr_body: ':arrow_up: Upgrades [`eas-build`](https://github.com/expo/eas-build) dependencies.'
|
||||
pr_reviewer: 'szdziedzic,radoslawkrzemien,sjchmiela,khamilowicz'
|
||||
github_token: ${{ secrets.EXPO_BOT_PAT }}
|
||||
|
||||
- uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{ secrets.EXPO_BOT_PAT }}
|
||||
script: |
|
||||
github.issues.createComment({
|
||||
issue_number: ${{ steps.open-pr.outputs.pr_number }},
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: "/changelog-entry chore Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies."
|
||||
})
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"eslint.enable": true,
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
"**/*.code-search": true,
|
||||
"**/src/**/build/**": false,
|
||||
"**/src/build/**": false,
|
||||
}
|
||||
}
|
||||
+3
-227
@@ -6,243 +6,19 @@ This is the log of notable changes to EAS CLI and related packages.
|
||||
|
||||
### 🛠 Breaking changes
|
||||
|
||||
- Stop creating a channel on `eas update` and `eas update:roll-back-to-embedded` unless the `--channel` flag is specified. ([#2346](https://github.com/expo/eas-cli/pull/2346) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Improve login info message for other login options. ([#2352](https://github.com/expo/eas-cli/pull/2352) by [@wschurman](https://github.com/wschurman))
|
||||
- Show the -s, --sso option in the login command help. ([#2353](https://github.com/expo/eas-cli/pull/2353) by [@lzkb](https://github.com/lzkb))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2351](https://github.com/expo/eas-cli/pull/2351) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Don't prompt users to set push notifications by default if they don't have the `expo-notifications` installed. ([#2343](https://github.com/expo/eas-cli/pull/2343) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.8.5](https://github.com/expo/eas-cli/releases/tag/v7.8.5) - 2024-04-26
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Add explicit workflow arg to expo-update CLI calls. ([#2340](https://github.com/expo/eas-cli/pull/2340) by [@wschurman](https://github.com/wschurman))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Improve error message if the server returns `UNAUTHORIZED_ERROR`. ([#2345](https://github.com/expo/eas-cli/pull/2345) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Fill in min expo-updates version for expo-updates CLI. ([#2344](https://github.com/expo/eas-cli/pull/2344) by [@wschurman](https://github.com/wschurman))
|
||||
|
||||
## [7.8.4](https://github.com/expo/eas-cli/releases/tag/v7.8.4) - 2024-04-24
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Update the list of available Android images. ([#2337](https://github.com/expo/eas-cli/pull/2337) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
- Make multi-select for revoking distribution certificates more readable. ([#2342](https://github.com/expo/eas-cli/pull/2342) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Improve error message displayed when EAS CLI version doesn't satisfy minimal version required specified in eas.json. ([#2341](https://github.com/expo/eas-cli/pull/2341) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.8.3](https://github.com/expo/eas-cli/releases/tag/v7.8.3) - 2024-04-23
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Don't prompt to set `android.package` and `ios.bundleIdentifier` values when running in non-interactive mode. ([#2336](https://github.com/expo/eas-cli/pull/2336) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Amend credential removal wording. ([#2334](https://github.com/expo/eas-cli/pull/2334) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
## [7.8.2](https://github.com/expo/eas-cli/releases/tag/v7.8.2) - 2024-04-15
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Fix display of errors when expo-updates CLI command fails. ([#2324](https://github.com/expo/eas-cli/pull/2324) by [@wschurman](https://github.com/wschurman))
|
||||
- Move credentials endpoints to paginated counterparts. ([#2327](https://github.com/expo/eas-cli/pull/2327) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Add progress bar for fetching paginated datasets. ([#2326](https://github.com/expo/eas-cli/pull/2326) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
## [7.8.1](https://github.com/expo/eas-cli/releases/tag/v7.8.1) - 2024-04-11
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Fix command source files URLs in autogenerated `README`. ([#2318](https://github.com/expo/eas-cli/pull/2318) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2316](https://github.com/expo/eas-cli/pull/2316) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Stop querying `Build.resourceClass` field. ([#2320](https://github.com/expo/eas-cli/pull/2320) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.8.0](https://github.com/expo/eas-cli/releases/tag/v7.8.0) - 2024-04-08
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Add `auto`, `sdk-50` and `sdk-49` image tags. ([#2298](https://github.com/expo/eas-cli/pull/2298) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Add `--build-logger-level` flag to `eas build` command. ([#2313](https://github.com/expo/eas-cli/pull/2313) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Deprecate the `default` image tag. ([#2298](https://github.com/expo/eas-cli/pull/2298) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Deprecate iOS images with Xcode version lower then 15. ([#2298](https://github.com/expo/eas-cli/pull/2298) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.7.0](https://github.com/expo/eas-cli/releases/tag/v7.7.0) - 2024-04-05
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Generate metadata file for project archive ([#2149](https://github.com/expo/eas-cli/pull/2149) by [@khamilowicz](https://github.com/khamilowicz))
|
||||
- Add --verbose-fastlane flag to eas submit command for more robust fastlane pilot logs. ([#2276](https://github.com/expo/eas-cli/pull/2276) by [@khamilowicz](https://github.com/khamilowicz))
|
||||
- Add `eas credentials:configure-build` subcommand. ([#2282](https://github.com/expo/eas-cli/pull/2282) by [@fiberjw](https://github.com/fiberjw))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Add info about the Xcode 15.3 image to `eas.schema.json`. ([#2312](https://github.com/expo/eas-cli/pull/2312) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.6.2](https://github.com/expo/eas-cli/releases/tag/v7.6.2) - 2024-03-27
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2301](https://github.com/expo/eas-cli/pull/2301) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2304](https://github.com/expo/eas-cli/pull/2304) by [@expo-bot](https://github.com/expo-bot))
|
||||
|
||||
## [7.6.1](https://github.com/expo/eas-cli/releases/tag/v7.6.1) - 2024-03-25
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2291](https://github.com/expo/eas-cli/pull/2291) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Fix asset limit punctuation. ([#2296](https://github.com/expo/eas-cli/pull/2296) by [@quinlanj](https://github.com/quinlanj))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2293](https://github.com/expo/eas-cli/pull/2293) by [@expo-bot](https://github.com/expo-bot))
|
||||
|
||||
## [7.6.0](https://github.com/expo/eas-cli/releases/tag/v7.6.0) - 2024-03-18
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Print uncommitted files in non-interactive mode if they fail the execution. ([#2288](https://github.com/expo/eas-cli/pull/2288) by [@sjchmiela](https://github.com/sjchmiela))
|
||||
|
||||
### 🐛 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))
|
||||
- Improve resolving vcsClient as a part of the project context. ([#2295](https://github.com/expo/eas-cli/pull/2295) 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))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2283](https://github.com/expo/eas-cli/pull/2283) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Bump the `@expo/apple-utils` version to switch between the `developer.apple.com` and `developer-mdn.apple.com` domains when one of them doesn't work. ([#2290](https://github.com/expo/eas-cli/pull/2290) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.5.0](https://github.com/expo/eas-cli/releases/tag/v7.5.0) - 2024-03-11
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Add `--auto-submit` option to `eas build:internal` command. ([#2271](https://github.com/expo/eas-cli/pull/2271) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2274](https://github.com/expo/eas-cli/pull/2274) by [@expo-bot](https://github.com/expo-bot))
|
||||
|
||||
## [7.4.0](https://github.com/expo/eas-cli/releases/tag/v7.4.0) - 2024-03-10
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Use new expo-updates configuration:syncnative for versioned native sync. ([#2269](https://github.com/expo/eas-cli/pull/2269) by [@wschurman](https://github.com/wschurman))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Fix expo-updates package version detection for canaries. ([#2243](https://github.com/expo/eas-cli/pull/2243) by [@wschurman](https://github.com/wschurman))
|
||||
- Add missing `config` property to `eas.json` schema. ([#2248](https://github.com/expo/eas-cli/pull/2248) by [@sjchmiela](https://github.com/sjchmiela))
|
||||
- Use expo-updates runtime version CLI to generate runtime versions. ([#2251](https://github.com/expo/eas-cli/pull/2251) by [@wschurman](https://github.com/wschurman))
|
||||
- Update @expo/apple-utils to handle changes in API. ([73ba19de6662763cc6bff9fac6b7700ffbd0e88a](https://github.com/expo/eas-cli/commit/73ba19de6662763cc6bff9fac6b7700ffbd0e88a) by [@brentvatne](https://github.com/brentvatne))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2237](https://github.com/expo/eas-cli/pull/2237) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2240](https://github.com/expo/eas-cli/pull/2240) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2253](https://github.com/expo/eas-cli/pull/2253) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Include src/\*\*/build directories in vscode search and replace. ([#2250](https://github.com/expo/eas-cli/pull/2250) by [@wschurman](https://github.com/wschurman))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2259](https://github.com/expo/eas-cli/pull/2259) by [@expo-bot](https://github.com/expo-bot))
|
||||
|
||||
## [7.3.0](https://github.com/expo/eas-cli/releases/tag/v7.3.0) - 2024-02-19
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Fix expo-updates fingerprinting during update. ([#2231](https://github.com/expo/eas-cli/pull/2231) by [@wschurman](https://github.com/wschurman))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Don't require expo on fresh react-native project. ([#2235](https://github.com/expo/eas-cli/pull/2235) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2229](https://github.com/expo/eas-cli/pull/2229) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2230](https://github.com/expo/eas-cli/pull/2230) by [@expo-bot](https://github.com/expo-bot))
|
||||
- Reword update configuration warning. ([#2234](https://github.com/expo/eas-cli/pull/2234) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
## [7.2.0](https://github.com/expo/eas-cli/releases/tag/v7.2.0) - 2024-02-11
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Support configuring a Google Service Account Key via eas credentials, for sending Android Notifications via FCM V1. ([#2197](https://github.com/expo/eas-cli/pull/2197) by [@christopherwalter](https://github.com/christopherwalter))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Revert expose expo export dev flag as an option in eas update. ([#2214](https://github.com/expo/eas-cli/pull/2214) by [@wschurman](https://github.com/wschurman))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2223](https://github.com/expo/eas-cli/pull/2223) by [@expo-bot](https://github.com/expo-bot))
|
||||
|
||||
## [7.1.3](https://github.com/expo/eas-cli/releases/tag/v7.1.3) - 2024-02-07
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Remove duplicated log message when creating ASC API key. ([#2208](https://github.com/expo/eas-cli/pull/2208) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
- Add simulator flag to metadata. ([#2073](https://github.com/expo/eas-cli/pull/2073) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
- Upgrade [`eas-build`](https://github.com/expo/eas-build) dependencies. ([#2220](https://github.com/expo/eas-cli/pull/2220) by [@expo-bot](https://github.com/expo-bot))
|
||||
|
||||
## [7.1.2](https://github.com/expo/eas-cli/releases/tag/v7.1.2) - 2024-01-30
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Add better validation for EAS Submit inputs. ([#2202](https://github.com/expo/eas-cli/pull/2202) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.1.1](https://github.com/expo/eas-cli/releases/tag/v7.1.1) - 2024-01-26
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- Revert incorrect EAS Submit input validation changes. ([#2200](https://github.com/expo/eas-cli/pull/2200) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.1.0](https://github.com/expo/eas-cli/releases/tag/v7.1.0) - 2024-01-26
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Support requireCommit for EAS Update. ([#2196](https://github.com/expo/eas-cli/pull/2196) by [@wschurman](https://github.com/wschurman))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Remove support for classic updates release channel in 50+. ([#2189](https://github.com/expo/eas-cli/pull/2189) by [@wschurman](https://github.com/wschurman))
|
||||
- Validate EAS Submit inputs better. ([#2198](https://github.com/expo/eas-cli/pull/2198) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
|
||||
## [7.0.0](https://github.com/expo/eas-cli/releases/tag/v7.0.0) - 2024-01-19
|
||||
|
||||
### 🛠 Breaking changes
|
||||
|
||||
- Stop generating eas-update-metadata.json on publish. ([#2187](https://github.com/expo/eas-cli/pull/2187) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Use branch mapping utility fn. ([#2186](https://github.com/expo/eas-cli/pull/2186) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
## [6.1.0](https://github.com/expo/eas-cli/releases/tag/v6.1.0) - 2024-01-18
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
- Add `build:delete` command. ([#2178](https://github.com/expo/eas-cli/pull/2178) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
- Add filter flags for `platform` and `profile` to `build:cancel` and `build:delete` commands. ([#2178](https://github.com/expo/eas-cli/pull/2178) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
### 🧹 Chores
|
||||
|
||||
- Remove "bare"-specific **eas.json** template. ([#2179](https://github.com/expo/eas-cli/pull/2179) by [@sjchmiela](https://github.com/sjchmiela))
|
||||
- Prompt users if they want to continue if EAS CLI fails to provision the devices. ([#2181](https://github.com/expo/eas-cli/pull/2181) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Update `eas-cli` and `@expo/eas-json` dependencies. ([#2176](https://github.com/expo/eas-cli/pull/2176) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Update `eas.schema.json` to after adding Xcode 15.2 image. ([#2184](https://github.com/expo/eas-cli/pull/2184) by [@szdziedzic](https://github.com/szdziedzic))
|
||||
- Upgrade packages from the expo/expo repo. ([#2145](https://github.com/expo/eas-cli/pull/2145) by [@wschurman](https://github.com/wschurman))
|
||||
- Prompt user to map channel on update if unmapped. ([#2185](https://github.com/expo/eas-cli/pull/2185) by [@quinlanj](https://github.com/quinlanj))
|
||||
|
||||
## [6.0.0](https://github.com/expo/eas-cli/releases/tag/v6.0.0) - 2024-01-12
|
||||
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
* @szdziedzic @khamilowicz @sjchmiela
|
||||
* @szdziedzic @khamilowicz
|
||||
|
||||
packages/eas-cli/src/build @szdziedzic @khamilowicz @sjchmiela
|
||||
packages/eas-cli/src/commands/build @szdziedzic @khamilowicz @sjchmiela
|
||||
packages/eas-cli/src/build @szdziedzic @khamilowicz
|
||||
packages/eas-cli/src/commands/build @szdziedzic @khamilowicz
|
||||
|
||||
packages/eas-cli/src/submit @szdziedzic @khamilowicz @sjchmiela
|
||||
packages/eas-cli/src/commands/submit.ts @szdziedzic @khamilowicz @sjchmiela
|
||||
packages/eas-cli/src/submit @szdziedzic @khamilowicz
|
||||
packages/eas-cli/src/commands/submit.ts @szdziedzic @khamilowicz
|
||||
|
||||
packages/eas-cli/src/update @EvanBacon @byCedric @wschurman
|
||||
packages/eas-cli/src/commands/update @EvanBacon @byCedric @wschurman
|
||||
@@ -13,4 +13,4 @@ packages/eas-cli/schema @bycedric
|
||||
packages/eas-cli/src/metadata @bycedric
|
||||
packages/eas-cli/src/commands/metadata @bycedric
|
||||
|
||||
packages/eas-json @szdziedzic @khamilowicz @sjchmiela
|
||||
packages/eas-json @szdziedzic @khamilowicz
|
||||
@@ -12,3 +12,7 @@ The algorithm works as follows:
|
||||
- If there are any entries in the "🛠 Breaking changes" section, bump the MAJOR version.
|
||||
- Otherwise, if there are any entries in the "🎉 New features", bump the MINOR version.
|
||||
- Otherwise, bump the PATCH version.
|
||||
|
||||
## Updating EAS CLI version on EAS Build
|
||||
|
||||
The release process promotes the new version to staging. After verifying it works there, you can promote it to production with `npm dist-tag add eas-cli@{version} latest-eas-build`.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"npmClient": "yarn",
|
||||
"version": "8.0.0",
|
||||
"version": "6.0.0",
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
|
||||
}
|
||||
+82
-138
@@ -68,7 +68,6 @@ eas --help COMMAND
|
||||
* [`eas build`](#eas-build)
|
||||
* [`eas build:cancel [BUILD_ID]`](#eas-buildcancel-build_id)
|
||||
* [`eas build:configure`](#eas-buildconfigure)
|
||||
* [`eas build:delete [BUILD_ID]`](#eas-builddelete-build_id)
|
||||
* [`eas build:inspect`](#eas-buildinspect)
|
||||
* [`eas build:list`](#eas-buildlist)
|
||||
* [`eas build:resign`](#eas-buildresign)
|
||||
@@ -85,7 +84,6 @@ eas --help COMMAND
|
||||
* [`eas channel:view [NAME]`](#eas-channelview-name)
|
||||
* [`eas config`](#eas-config)
|
||||
* [`eas credentials`](#eas-credentials)
|
||||
* [`eas credentials:configure-build`](#eas-credentialsconfigure-build)
|
||||
* [`eas device:create`](#eas-devicecreate)
|
||||
* [`eas device:delete`](#eas-devicedelete)
|
||||
* [`eas device:list`](#eas-devicelist)
|
||||
@@ -128,10 +126,7 @@ log in with your Expo account
|
||||
|
||||
```
|
||||
USAGE
|
||||
$ eas account:login [-s]
|
||||
|
||||
FLAGS
|
||||
-s, --sso Login with SSO
|
||||
$ eas account:login
|
||||
|
||||
DESCRIPTION
|
||||
log in with your Expo account
|
||||
@@ -140,7 +135,7 @@ ALIASES
|
||||
$ eas login
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/account/login.ts)_
|
||||
_See code: [src/commands/account/login.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/account/login.ts)_
|
||||
|
||||
## `eas account:logout`
|
||||
|
||||
@@ -157,7 +152,7 @@ ALIASES
|
||||
$ eas logout
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/account/logout.ts)_
|
||||
_See code: [src/commands/account/logout.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/account/logout.ts)_
|
||||
|
||||
## `eas account:view`
|
||||
|
||||
@@ -174,7 +169,7 @@ ALIASES
|
||||
$ eas whoami
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/account/view.ts)_
|
||||
_See code: [src/commands/account/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/account/view.ts)_
|
||||
|
||||
## `eas analytics [STATUS]`
|
||||
|
||||
@@ -188,7 +183,7 @@ DESCRIPTION
|
||||
display or change analytics settings
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/analytics.ts)_
|
||||
_See code: [src/commands/analytics.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/analytics.ts)_
|
||||
|
||||
## `eas autocomplete [SHELL]`
|
||||
|
||||
@@ -219,7 +214,7 @@ EXAMPLES
|
||||
$ eas autocomplete --refresh-cache
|
||||
```
|
||||
|
||||
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v2.3.10/packages/eas-cli/src/commands/autocomplete/index.ts)_
|
||||
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v2.3.10/src/commands/autocomplete/index.ts)_
|
||||
|
||||
## `eas branch:create [NAME]`
|
||||
|
||||
@@ -240,7 +235,7 @@ DESCRIPTION
|
||||
create a branch
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/branch/create.ts)_
|
||||
_See code: [src/commands/branch/create.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/branch/create.ts)_
|
||||
|
||||
## `eas branch:delete [NAME]`
|
||||
|
||||
@@ -261,7 +256,7 @@ DESCRIPTION
|
||||
delete a branch
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/branch/delete.ts)_
|
||||
_See code: [src/commands/branch/delete.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/branch/delete.ts)_
|
||||
|
||||
## `eas branch:list`
|
||||
|
||||
@@ -281,7 +276,7 @@ DESCRIPTION
|
||||
list all branches
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/branch/list.ts)_
|
||||
_See code: [src/commands/branch/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/branch/list.ts)_
|
||||
|
||||
## `eas branch:rename`
|
||||
|
||||
@@ -301,7 +296,7 @@ DESCRIPTION
|
||||
rename a branch
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/branch/rename.ts)_
|
||||
_See code: [src/commands/branch/rename.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/branch/rename.ts)_
|
||||
|
||||
## `eas branch:view [NAME]`
|
||||
|
||||
@@ -324,7 +319,7 @@ DESCRIPTION
|
||||
view a branch
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/branch/view.ts)_
|
||||
_See code: [src/commands/branch/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/branch/view.ts)_
|
||||
|
||||
## `eas build`
|
||||
|
||||
@@ -333,33 +328,28 @@ start a build
|
||||
```
|
||||
USAGE
|
||||
$ eas build [-p android|ios|all] [-e <value>] [--local] [--output <value>] [--wait] [--clear-cache]
|
||||
[--auto-submit | --auto-submit-with-profile <value>] [-m <value>] [--build-logger-level
|
||||
trace|debug|info|warn|error|fatal] [--json --non-interactive]
|
||||
[--auto-submit | --auto-submit-with-profile <value>] [-m <value>] [--json --non-interactive]
|
||||
|
||||
FLAGS
|
||||
-e, --profile=PROFILE_NAME Name of the build profile from eas.json. Defaults to
|
||||
"production" if defined in eas.json.
|
||||
-m, --message=<value> A short message describing the build
|
||||
-e, --profile=PROFILE_NAME Name of the build profile from eas.json. Defaults to "production" if defined
|
||||
in eas.json.
|
||||
-m, --message=<value> A short message describing the build
|
||||
-p, --platform=(android|ios|all)
|
||||
--auto-submit Submit on build complete using the submit profile with the
|
||||
same name as the build profile
|
||||
--auto-submit-with-profile=PROFILE_NAME Submit on build complete using the submit profile with
|
||||
provided name
|
||||
--build-logger-level=(trace|debug|info|warn|error|fatal) The level of logs to output during the build process.
|
||||
Defaults to "info".
|
||||
--clear-cache Clear cache before the build
|
||||
--json Enable JSON output, non-JSON messages will be printed to
|
||||
stderr.
|
||||
--local Run build locally [experimental]
|
||||
--non-interactive Run the command in non-interactive mode.
|
||||
--output=<value> Output path for local build
|
||||
--[no-]wait Wait for build(s) to complete
|
||||
--auto-submit Submit on build complete using the submit profile with the same name as the
|
||||
build profile
|
||||
--auto-submit-with-profile=PROFILE_NAME Submit on build complete using the submit profile with provided name
|
||||
--clear-cache Clear cache before the build
|
||||
--json Enable JSON output, non-JSON messages will be printed to stderr.
|
||||
--local Run build locally [experimental]
|
||||
--non-interactive Run the command in non-interactive mode.
|
||||
--output=<value> Output path for local build
|
||||
--[no-]wait Wait for build(s) to complete
|
||||
|
||||
DESCRIPTION
|
||||
start a build
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/index.ts)_
|
||||
_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/index.ts)_
|
||||
|
||||
## `eas build:cancel [BUILD_ID]`
|
||||
|
||||
@@ -367,18 +357,16 @@ cancel a build
|
||||
|
||||
```
|
||||
USAGE
|
||||
$ eas build:cancel [BUILD_ID] [--non-interactive] [-p android|ios|all] [-e <value>]
|
||||
$ eas build:cancel [BUILD_ID] [--non-interactive]
|
||||
|
||||
FLAGS
|
||||
-e, --profile=PROFILE_NAME Filter builds by build profile if build ID is not provided
|
||||
-p, --platform=(android|ios|all) Filter builds by the platform if build ID is not provided
|
||||
--non-interactive Run the command in non-interactive mode.
|
||||
--non-interactive Run the command in non-interactive mode.
|
||||
|
||||
DESCRIPTION
|
||||
cancel a build
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/cancel.ts)_
|
||||
_See code: [src/commands/build/cancel.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/cancel.ts)_
|
||||
|
||||
## `eas build:configure`
|
||||
|
||||
@@ -395,26 +383,7 @@ DESCRIPTION
|
||||
configure the project to support EAS Build
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/configure.ts)_
|
||||
|
||||
## `eas build:delete [BUILD_ID]`
|
||||
|
||||
delete a build
|
||||
|
||||
```
|
||||
USAGE
|
||||
$ eas build:delete [BUILD_ID] [--non-interactive] [-p android|ios|all] [-e <value>]
|
||||
|
||||
FLAGS
|
||||
-e, --profile=PROFILE_NAME Filter builds by build profile if build ID is not provided
|
||||
-p, --platform=(android|ios|all) Filter builds by the platform if build ID is not provided
|
||||
--non-interactive Run the command in non-interactive mode.
|
||||
|
||||
DESCRIPTION
|
||||
delete a build
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/delete.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/delete.ts)_
|
||||
_See code: [src/commands/build/configure.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/configure.ts)_
|
||||
|
||||
## `eas build:inspect`
|
||||
|
||||
@@ -449,7 +418,7 @@ DESCRIPTION
|
||||
inspect the state of the project at specific build stages, useful for troubleshooting
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/inspect.ts)_
|
||||
_See code: [src/commands/build/inspect.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/inspect.ts)_
|
||||
|
||||
## `eas build:list`
|
||||
|
||||
@@ -461,7 +430,7 @@ USAGE
|
||||
new|in-queue|in-progress|pending-cancel|errored|finished|canceled] [--distribution store|internal|simulator]
|
||||
[--channel <value>] [--appVersion <value>] [--appBuildVersion <value>] [--sdkVersion <value>] [--runtimeVersion
|
||||
<value>] [--appIdentifier <value>] [--buildProfile <value>] [--gitCommitHash <value>] [--offset <value>] [--limit
|
||||
<value>] [--json --non-interactive] [--simulator]
|
||||
<value>] [--json --non-interactive]
|
||||
|
||||
FLAGS
|
||||
--appBuildVersion=<value>
|
||||
@@ -481,16 +450,13 @@ FLAGS
|
||||
--platform=(all|android|ios)
|
||||
--runtimeVersion=<value>
|
||||
--sdkVersion=<value>
|
||||
--simulator Filter only iOS simulator builds. Can
|
||||
only be used with --platform flag set to
|
||||
"ios"
|
||||
--status=(new|in-queue|in-progress|pending-cancel|errored|finished|canceled)
|
||||
|
||||
DESCRIPTION
|
||||
list all builds for your project
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/list.ts)_
|
||||
_See code: [src/commands/build/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/list.ts)_
|
||||
|
||||
## `eas build:resign`
|
||||
|
||||
@@ -516,7 +482,7 @@ DESCRIPTION
|
||||
re-sign a build archive
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/resign.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/resign.ts)_
|
||||
_See code: [src/commands/build/resign.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/resign.ts)_
|
||||
|
||||
## `eas build:run`
|
||||
|
||||
@@ -542,7 +508,7 @@ DESCRIPTION
|
||||
run simulator/emulator builds from eas-cli
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/run.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/run.ts)_
|
||||
_See code: [src/commands/build/run.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/run.ts)_
|
||||
|
||||
## `eas build:submit`
|
||||
|
||||
@@ -551,7 +517,7 @@ submit app binary to App Store and/or Play Store
|
||||
```
|
||||
USAGE
|
||||
$ eas build:submit [-p android|ios|all] [-e <value>] [--latest | --id <value> | --path <value> | --url <value>]
|
||||
[--verbose] [--wait] [--verbose-fastlane] [--non-interactive]
|
||||
[--verbose] [--wait] [--non-interactive]
|
||||
|
||||
FLAGS
|
||||
-e, --profile=<value> Name of the submit profile from eas.json. Defaults to "production" if defined in
|
||||
@@ -563,7 +529,6 @@ FLAGS
|
||||
--path=<value> Path to the .apk/.aab/.ipa file
|
||||
--url=<value> App archive url
|
||||
--verbose Always print logs from EAS Submit
|
||||
--verbose-fastlane Enable verbose logging for the submission process
|
||||
--[no-]wait Wait for submission to complete
|
||||
|
||||
DESCRIPTION
|
||||
@@ -592,7 +557,7 @@ DESCRIPTION
|
||||
get the latest version from EAS servers
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/version/get.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/version/get.ts)_
|
||||
_See code: [src/commands/build/version/get.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/version/get.ts)_
|
||||
|
||||
## `eas build:version:set`
|
||||
|
||||
@@ -611,7 +576,7 @@ DESCRIPTION
|
||||
update version of an app
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/version/set.ts)_
|
||||
_See code: [src/commands/build/version/set.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/version/set.ts)_
|
||||
|
||||
## `eas build:version:sync`
|
||||
|
||||
@@ -630,7 +595,7 @@ DESCRIPTION
|
||||
update a version in native code with a value stored on EAS servers
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/version/sync.ts)_
|
||||
_See code: [src/commands/build/version/sync.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/version/sync.ts)_
|
||||
|
||||
## `eas build:view [BUILD_ID]`
|
||||
|
||||
@@ -647,7 +612,7 @@ DESCRIPTION
|
||||
view a build for your project
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/build/view.ts)_
|
||||
_See code: [src/commands/build/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/build/view.ts)_
|
||||
|
||||
## `eas channel:create [NAME]`
|
||||
|
||||
@@ -668,7 +633,7 @@ DESCRIPTION
|
||||
create a channel
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/channel/create.ts)_
|
||||
_See code: [src/commands/channel/create.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/channel/create.ts)_
|
||||
|
||||
## `eas channel:edit [NAME]`
|
||||
|
||||
@@ -690,7 +655,7 @@ DESCRIPTION
|
||||
point a channel at a new branch
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/channel/edit.ts)_
|
||||
_See code: [src/commands/channel/edit.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/channel/edit.ts)_
|
||||
|
||||
## `eas channel:list`
|
||||
|
||||
@@ -710,7 +675,7 @@ DESCRIPTION
|
||||
list all channels
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/channel/list.ts)_
|
||||
_See code: [src/commands/channel/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/channel/list.ts)_
|
||||
|
||||
## `eas channel:rollout [CHANNEL]`
|
||||
|
||||
@@ -742,7 +707,7 @@ DESCRIPTION
|
||||
Roll a new branch out on a channel incrementally.
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/channel/rollout.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/channel/rollout.ts)_
|
||||
_See code: [src/commands/channel/rollout.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/channel/rollout.ts)_
|
||||
|
||||
## `eas channel:view [NAME]`
|
||||
|
||||
@@ -765,7 +730,7 @@ DESCRIPTION
|
||||
view a channel
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/channel/view.ts)_
|
||||
_See code: [src/commands/channel/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/channel/view.ts)_
|
||||
|
||||
## `eas config`
|
||||
|
||||
@@ -786,7 +751,7 @@ DESCRIPTION
|
||||
display project configuration (app.json + eas.json)
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/config.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/config.ts)_
|
||||
_See code: [src/commands/config.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/config.ts)_
|
||||
|
||||
## `eas credentials`
|
||||
|
||||
@@ -803,25 +768,7 @@ DESCRIPTION
|
||||
manage credentials
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/credentials/index.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/credentials/index.ts)_
|
||||
|
||||
## `eas credentials:configure-build`
|
||||
|
||||
Set up credentials for building your project.
|
||||
|
||||
```
|
||||
USAGE
|
||||
$ eas credentials:configure-build [-p android|ios] [-e <value>]
|
||||
|
||||
FLAGS
|
||||
-e, --profile=PROFILE_NAME The name of the build profile in eas.json.
|
||||
-p, --platform=(android|ios)
|
||||
|
||||
DESCRIPTION
|
||||
Set up credentials for building your project.
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/credentials/configure-build.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/credentials/configure-build.ts)_
|
||||
_See code: [src/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/credentials.ts)_
|
||||
|
||||
## `eas device:create`
|
||||
|
||||
@@ -835,7 +782,7 @@ DESCRIPTION
|
||||
register new Apple Devices to use for internal distribution
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/device/create.ts)_
|
||||
_See code: [src/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/device/create.ts)_
|
||||
|
||||
## `eas device:delete`
|
||||
|
||||
@@ -855,7 +802,7 @@ DESCRIPTION
|
||||
remove a registered device from your account
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/device/delete.ts)_
|
||||
_See code: [src/commands/device/delete.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/device/delete.ts)_
|
||||
|
||||
## `eas device:list`
|
||||
|
||||
@@ -876,7 +823,7 @@ DESCRIPTION
|
||||
list all registered devices for your account
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/device/list.ts)_
|
||||
_See code: [src/commands/device/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/device/list.ts)_
|
||||
|
||||
## `eas device:rename`
|
||||
|
||||
@@ -897,7 +844,7 @@ DESCRIPTION
|
||||
rename a registered device
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/device/rename.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/device/rename.ts)_
|
||||
_See code: [src/commands/device/rename.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/device/rename.ts)_
|
||||
|
||||
## `eas device:view [UDID]`
|
||||
|
||||
@@ -911,7 +858,7 @@ DESCRIPTION
|
||||
view a device for your project
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/device/view.ts)_
|
||||
_See code: [src/commands/device/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/device/view.ts)_
|
||||
|
||||
## `eas diagnostics`
|
||||
|
||||
@@ -925,7 +872,7 @@ DESCRIPTION
|
||||
display environment info
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/diagnostics.ts)_
|
||||
_See code: [src/commands/diagnostics.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/diagnostics.ts)_
|
||||
|
||||
## `eas help [COMMAND]`
|
||||
|
||||
@@ -945,7 +892,7 @@ DESCRIPTION
|
||||
Display help for eas.
|
||||
```
|
||||
|
||||
_See code: [@expo/plugin-help](https://github.com/expo/oclif-plugin-help/blob/v5.1.23/packages/eas-cli/src/commands/help.ts)_
|
||||
_See code: [@expo/plugin-help](https://github.com/expo/oclif-plugin-help/blob/v5.1.23/src/commands/help.ts)_
|
||||
|
||||
## `eas init`
|
||||
|
||||
@@ -973,10 +920,7 @@ log in with your Expo account
|
||||
|
||||
```
|
||||
USAGE
|
||||
$ eas login [-s]
|
||||
|
||||
FLAGS
|
||||
-s, --sso Login with SSO
|
||||
$ eas login
|
||||
|
||||
DESCRIPTION
|
||||
log in with your Expo account
|
||||
@@ -1016,7 +960,7 @@ DESCRIPTION
|
||||
validate the local store configuration
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/metadata/lint.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/metadata/lint.ts)_
|
||||
_See code: [src/commands/metadata/lint.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/metadata/lint.ts)_
|
||||
|
||||
## `eas metadata:pull`
|
||||
|
||||
@@ -1033,7 +977,7 @@ DESCRIPTION
|
||||
generate the local store configuration from the app stores
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/metadata/pull.ts)_
|
||||
_See code: [src/commands/metadata/pull.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/metadata/pull.ts)_
|
||||
|
||||
## `eas metadata:push`
|
||||
|
||||
@@ -1050,7 +994,7 @@ DESCRIPTION
|
||||
sync the local store configuration to the app stores
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/metadata/push.ts)_
|
||||
_See code: [src/commands/metadata/push.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/metadata/push.ts)_
|
||||
|
||||
## `eas open`
|
||||
|
||||
@@ -1064,7 +1008,7 @@ DESCRIPTION
|
||||
open the project page in a web browser
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/open.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/open.ts)_
|
||||
_See code: [src/commands/open.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/open.ts)_
|
||||
|
||||
## `eas project:info`
|
||||
|
||||
@@ -1078,7 +1022,7 @@ DESCRIPTION
|
||||
information about the current project
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/project/info.ts)_
|
||||
_See code: [src/commands/project/info.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/project/info.ts)_
|
||||
|
||||
## `eas project:init`
|
||||
|
||||
@@ -1100,7 +1044,7 @@ ALIASES
|
||||
$ eas init
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/project/init.ts)_
|
||||
_See code: [src/commands/project/init.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/project/init.ts)_
|
||||
|
||||
## `eas secret:create`
|
||||
|
||||
@@ -1123,7 +1067,7 @@ DESCRIPTION
|
||||
create an environment secret on the current project or owner account
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/secret/create.ts)_
|
||||
_See code: [src/commands/secret/create.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/secret/create.ts)_
|
||||
|
||||
## `eas secret:delete`
|
||||
|
||||
@@ -1141,7 +1085,7 @@ DESCRIPTION
|
||||
delete an environment secret by ID
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/secret/delete.ts)_
|
||||
_See code: [src/commands/secret/delete.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/secret/delete.ts)_
|
||||
|
||||
## `eas secret:list`
|
||||
|
||||
@@ -1155,7 +1099,7 @@ DESCRIPTION
|
||||
list environment secrets available for your current app
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/secret/list.ts)_
|
||||
_See code: [src/commands/secret/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/secret/list.ts)_
|
||||
|
||||
## `eas secret:push`
|
||||
|
||||
@@ -1175,7 +1119,7 @@ DESCRIPTION
|
||||
read environment secrets from env file and store on the server
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/secret/push.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/secret/push.ts)_
|
||||
_See code: [src/commands/secret/push.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/secret/push.ts)_
|
||||
|
||||
## `eas submit`
|
||||
|
||||
@@ -1184,7 +1128,7 @@ submit app binary to App Store and/or Play Store
|
||||
```
|
||||
USAGE
|
||||
$ eas submit [-p android|ios|all] [-e <value>] [--latest | --id <value> | --path <value> | --url <value>]
|
||||
[--verbose] [--wait] [--verbose-fastlane] [--non-interactive]
|
||||
[--verbose] [--wait] [--non-interactive]
|
||||
|
||||
FLAGS
|
||||
-e, --profile=<value> Name of the submit profile from eas.json. Defaults to "production" if defined in
|
||||
@@ -1196,7 +1140,6 @@ FLAGS
|
||||
--path=<value> Path to the .apk/.aab/.ipa file
|
||||
--url=<value> App archive url
|
||||
--verbose Always print logs from EAS Submit
|
||||
--verbose-fastlane Enable verbose logging for the submission process
|
||||
--[no-]wait Wait for submission to complete
|
||||
|
||||
DESCRIPTION
|
||||
@@ -1206,7 +1149,7 @@ ALIASES
|
||||
$ eas build:submit
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/submit.ts)_
|
||||
_See code: [src/commands/submit.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/submit.ts)_
|
||||
|
||||
## `eas update`
|
||||
|
||||
@@ -1215,8 +1158,8 @@ publish an update group
|
||||
```
|
||||
USAGE
|
||||
$ eas update [--branch <value>] [--channel <value>] [-m <value>] [--republish | --input-dir <value> |
|
||||
--skip-bundler] [--group <value> | | ] [--clear-cache] [-p android|ios|all] [--auto] [--private-key-path <value>]
|
||||
[--json --non-interactive]
|
||||
--skip-bundler] [--group <value> | | ] [--clear-cache] [-p android|ios|all] [--dev] [--auto] [--private-key-path
|
||||
<value>] [--json --non-interactive]
|
||||
|
||||
FLAGS
|
||||
-m, --message=<value> A short message describing the update
|
||||
@@ -1225,6 +1168,7 @@ FLAGS
|
||||
--branch=<value> Branch to publish the update group on
|
||||
--channel=<value> Channel that the published update should affect
|
||||
--clear-cache Clear the bundler cache before publishing
|
||||
--dev Publish a development bundle
|
||||
--group=<value> Update group to republish (deprecated, see republish command)
|
||||
--input-dir=<value> [default: dist] Location of the bundle
|
||||
--json Enable JSON output, non-JSON messages will be printed to stderr.
|
||||
@@ -1239,7 +1183,7 @@ DESCRIPTION
|
||||
publish an update group
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/index.ts)_
|
||||
_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/index.ts)_
|
||||
|
||||
## `eas update:configure`
|
||||
|
||||
@@ -1257,7 +1201,7 @@ DESCRIPTION
|
||||
configure the project to support EAS Update
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/configure.ts)_
|
||||
_See code: [src/commands/update/configure.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/configure.ts)_
|
||||
|
||||
## `eas update:delete GROUPID`
|
||||
|
||||
@@ -1278,7 +1222,7 @@ DESCRIPTION
|
||||
delete all the updates in an update group
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/delete.ts)_
|
||||
_See code: [src/commands/update/delete.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/delete.ts)_
|
||||
|
||||
## `eas update:list`
|
||||
|
||||
@@ -1300,7 +1244,7 @@ DESCRIPTION
|
||||
view the recent updates
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/list.ts)_
|
||||
_See code: [src/commands/update/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/list.ts)_
|
||||
|
||||
## `eas update:republish`
|
||||
|
||||
@@ -1327,7 +1271,7 @@ DESCRIPTION
|
||||
roll back to an existing update
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/republish.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/republish.ts)_
|
||||
_See code: [src/commands/update/republish.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/republish.ts)_
|
||||
|
||||
## `eas update:roll-back-to-embedded`
|
||||
|
||||
@@ -1354,7 +1298,7 @@ DESCRIPTION
|
||||
roll back to the embedded update
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/roll-back-to-embedded.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/roll-back-to-embedded.ts)_
|
||||
_See code: [src/commands/update/roll-back-to-embedded.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/roll-back-to-embedded.ts)_
|
||||
|
||||
## `eas update:rollback`
|
||||
|
||||
@@ -1373,7 +1317,7 @@ DESCRIPTION
|
||||
roll back to an embedded update or an existing update
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/rollback.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/rollback.ts)_
|
||||
_See code: [src/commands/update/rollback.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/rollback.ts)_
|
||||
|
||||
## `eas update:view GROUPID`
|
||||
|
||||
@@ -1393,7 +1337,7 @@ DESCRIPTION
|
||||
update group details
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/update/view.ts)_
|
||||
_See code: [src/commands/update/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/update/view.ts)_
|
||||
|
||||
## `eas webhook:create`
|
||||
|
||||
@@ -1414,7 +1358,7 @@ DESCRIPTION
|
||||
create a webhook
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/webhook/create.ts)_
|
||||
_See code: [src/commands/webhook/create.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/webhook/create.ts)_
|
||||
|
||||
## `eas webhook:delete [ID]`
|
||||
|
||||
@@ -1434,7 +1378,7 @@ DESCRIPTION
|
||||
delete a webhook
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/webhook/delete.ts)_
|
||||
_See code: [src/commands/webhook/delete.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/webhook/delete.ts)_
|
||||
|
||||
## `eas webhook:list`
|
||||
|
||||
@@ -1452,7 +1396,7 @@ DESCRIPTION
|
||||
list webhooks
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/webhook/list.ts)_
|
||||
_See code: [src/commands/webhook/list.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/webhook/list.ts)_
|
||||
|
||||
## `eas webhook:update`
|
||||
|
||||
@@ -1474,7 +1418,7 @@ DESCRIPTION
|
||||
update a webhook
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/webhook/update.ts)_
|
||||
_See code: [src/commands/webhook/update.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/webhook/update.ts)_
|
||||
|
||||
## `eas webhook:view ID`
|
||||
|
||||
@@ -1491,7 +1435,7 @@ DESCRIPTION
|
||||
view a webhook
|
||||
```
|
||||
|
||||
_See code: [packages/eas-cli/src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v8.0.0/packages/eas-cli/src/commands/webhook/view.ts)_
|
||||
_See code: [src/commands/webhook/view.ts](https://github.com/expo/eas-cli/blob/v6.0.0/src/commands/webhook/view.ts)_
|
||||
|
||||
## `eas whoami`
|
||||
|
||||
|
||||
Generated
+127
-2625
File diff suppressed because it is too large.
Load diff
@@ -1,22 +1,21 @@
|
||||
{
|
||||
"name": "eas-cli",
|
||||
"description": "EAS command line tool",
|
||||
"version": "8.0.0",
|
||||
"version": "6.0.0",
|
||||
"author": "Expo <[email protected]>",
|
||||
"bin": {
|
||||
"eas": "./bin/run"
|
||||
},
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"dependencies": {
|
||||
"@expo/apple-utils": "1.7.0",
|
||||
"@expo/apple-utils": "1.3.2",
|
||||
"@expo/code-signing-certificates": "0.0.5",
|
||||
"@expo/config": "8.5.4",
|
||||
"@expo/config-plugins": "7.8.4",
|
||||
"@expo/config-types": "50.0.0",
|
||||
"@expo/eas-build-job": "1.0.102",
|
||||
"@expo/eas-json": "8.0.0",
|
||||
"@expo/config": "8.1.2",
|
||||
"@expo/config-plugins": "7.2.4",
|
||||
"@expo/config-types": "49.0.0",
|
||||
"@expo/eas-build-job": "1.0.56",
|
||||
"@expo/eas-json": "6.0.0",
|
||||
"@expo/json-file": "8.2.37",
|
||||
"@expo/logger": "1.0.57",
|
||||
"@expo/multipart-body-parser": "1.1.0",
|
||||
"@expo/osascript": "2.0.33",
|
||||
"@expo/package-manager": "1.1.2",
|
||||
@@ -24,11 +23,11 @@
|
||||
"@expo/plist": "0.0.20",
|
||||
"@expo/plugin-help": "5.1.23",
|
||||
"@expo/plugin-warn-if-update-available": "2.5.1",
|
||||
"@expo/prebuild-config": "6.7.3",
|
||||
"@expo/prebuild-config": "6.2.5",
|
||||
"@expo/results": "1.0.0",
|
||||
"@expo/rudder-sdk-node": "1.1.1",
|
||||
"@expo/spawn-async": "1.7.0",
|
||||
"@expo/steps": "1.0.102",
|
||||
"@expo/steps": "1.0.51",
|
||||
"@expo/timeago.js": "1.0.0",
|
||||
"@oclif/core": "^1.26.2",
|
||||
"@oclif/plugin-autocomplete": "^2.3.10",
|
||||
@@ -77,7 +76,7 @@
|
||||
"resolve-from": "5.0.0",
|
||||
"semver": "7.5.4",
|
||||
"slash": "3.0.0",
|
||||
"tar": "6.2.1",
|
||||
"tar": "6.2.0",
|
||||
"terminal-link": "2.1.1",
|
||||
"tslib": "2.6.2",
|
||||
"turndown": "7.1.2",
|
||||
@@ -110,7 +109,7 @@
|
||||
"@types/wrap-ansi": "3.0.0",
|
||||
"axios": "0.27.2",
|
||||
"eslint-plugin-graphql": "4.0.0",
|
||||
"express": "4.19.2",
|
||||
"express": "4.18.2",
|
||||
"memfs": "3.4.13",
|
||||
"mockdate": "3.0.5",
|
||||
"nock": "13.4.0",
|
||||
|
||||
@@ -3,7 +3,8 @@ const fs = require('fs/promises');
|
||||
(async () => {
|
||||
// Patch `oclif readme` path and link generation
|
||||
let readmeContent = await fs.readFile('README.md', 'utf8');
|
||||
readmeContent = readmeContent.replace(/src\/commands/g, 'packages/eas-cli/src/commands');
|
||||
readmeContent = readmeContent.replace(/\[build\//g, '[src/');
|
||||
readmeContent = readmeContent.replace(/build\/commands/g, 'packages/eas-cli/src/commands');
|
||||
await fs.writeFile('README.md', readmeContent);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
|
||||
@@ -3,7 +3,13 @@ import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { selectBuildToCancelAsync } from '../../commands/build/cancel';
|
||||
import { AppPlatform, BuildFragment, BuildPriority, BuildStatus } from '../../graphql/generated';
|
||||
import {
|
||||
AppPlatform,
|
||||
BuildFragment,
|
||||
BuildPriority,
|
||||
BuildResourceClass,
|
||||
BuildStatus,
|
||||
} from '../../graphql/generated';
|
||||
import { BuildQuery } from '../../graphql/queries/BuildQuery';
|
||||
import { confirmAsync, selectAsync } from '../../prompts';
|
||||
|
||||
@@ -85,6 +91,6 @@ function createMockBuildFragment({
|
||||
},
|
||||
},
|
||||
status: BuildStatus.InQueue,
|
||||
isForIosSimulator: false,
|
||||
resourceClass: BuildResourceClass.AndroidMedium,
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,13 @@ import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { selectBuildToDeleteAsync } from '../../commands/build/delete';
|
||||
import { AppPlatform, BuildFragment, BuildPriority, BuildStatus } from '../../graphql/generated';
|
||||
import {
|
||||
AppPlatform,
|
||||
BuildFragment,
|
||||
BuildPriority,
|
||||
BuildResourceClass,
|
||||
BuildStatus,
|
||||
} from '../../graphql/generated';
|
||||
import { BuildQuery } from '../../graphql/queries/BuildQuery';
|
||||
import { confirmAsync, selectAsync } from '../../prompts';
|
||||
|
||||
@@ -85,6 +91,6 @@ function createMockBuildFragment({
|
||||
},
|
||||
},
|
||||
status: BuildStatus.InQueue,
|
||||
isForIosSimulator: false,
|
||||
resourceClass: BuildResourceClass.AndroidMedium,
|
||||
};
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
import { getAppBuildGradleAsync, resolveConfigValue } from '../../../project/android/gradleUtils';
|
||||
import { resolveVcsClient } from '../../../vcs';
|
||||
import { getVcsClient } from '../../../vcs';
|
||||
import {
|
||||
BumpStrategy,
|
||||
bumpVersionAsync,
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
const fsReal = jest.requireActual('fs').promises as typeof fs;
|
||||
jest.mock('fs');
|
||||
|
||||
const vcsClient = resolveVcsClient();
|
||||
const vcsClient = getVcsClient();
|
||||
|
||||
afterAll(async () => {
|
||||
// do not remove the following line
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Android, Metadata, Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { Android, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { AppVersionSource } from '@expo/eas-json';
|
||||
import chalk from 'chalk';
|
||||
import nullthrows from 'nullthrows';
|
||||
@@ -99,20 +99,21 @@ export async function prepareAndroidBuildAsync(
|
||||
return await ensureAndroidCredentialsAsync(ctx);
|
||||
},
|
||||
syncProjectConfigurationAsync: async () => {
|
||||
await syncProjectConfigurationAsync({
|
||||
await syncProjectConfigurationAsync(ctx.graphqlClient, {
|
||||
projectDir: ctx.projectDir,
|
||||
exp: ctx.exp,
|
||||
localAutoIncrement:
|
||||
ctx.easJsonCliConfig?.appVersionSource === AppVersionSource.REMOTE
|
||||
? false
|
||||
: ctx.buildProfile.autoIncrement,
|
||||
projectId: ctx.projectId,
|
||||
vcsClient: ctx.vcsClient,
|
||||
});
|
||||
},
|
||||
prepareJobAsync: async (
|
||||
ctx: BuildContext<Platform.ANDROID>,
|
||||
jobData: JobData<AndroidCredentials>
|
||||
): Promise<Android.Job> => {
|
||||
): Promise<Job> => {
|
||||
return await prepareJobAsync(ctx, jobData);
|
||||
},
|
||||
sendBuildRequestAsync: async (
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Android } from '@expo/eas-build-job';
|
||||
|
||||
import { AndroidBuildType, AndroidJobInput } from '../../graphql/generated';
|
||||
import {
|
||||
loggerLevelToGraphQLWorkerLoggerLevel,
|
||||
transformBuildMode,
|
||||
transformBuildTrigger,
|
||||
transformProjectArchive,
|
||||
@@ -30,9 +29,6 @@ export function transformJob(job: Android.Job): AndroidJobInput {
|
||||
experimental: job.experimental,
|
||||
mode: transformBuildMode(job.mode),
|
||||
customBuildConfig: job.customBuildConfig,
|
||||
loggerLevel: job.loggerLevel
|
||||
? loggerLevelToGraphQLWorkerLoggerLevel[job.loggerLevel]
|
||||
: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,16 @@ import {
|
||||
ArchiveSource,
|
||||
BuildMode,
|
||||
BuildTrigger,
|
||||
Job,
|
||||
Platform,
|
||||
sanitizeBuildJob,
|
||||
sanitizeJob,
|
||||
} from '@expo/eas-build-job';
|
||||
import { BuildProfile } from '@expo/eas-json';
|
||||
import path from 'path';
|
||||
import slash from 'slash';
|
||||
|
||||
import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider';
|
||||
import { getCustomBuildConfigPathForJob } from '../../project/customBuildConfig';
|
||||
import { getCustomBuildConfigPath } from '../../project/customBuildConfig';
|
||||
import { getUsername } from '../../project/projectUtils';
|
||||
import { BuildContext } from '../context';
|
||||
|
||||
@@ -28,7 +29,7 @@ const cacheDefaults = {
|
||||
export async function prepareJobAsync(
|
||||
ctx: BuildContext<Platform.ANDROID>,
|
||||
jobData: JobData
|
||||
): Promise<Android.Job> {
|
||||
): Promise<Job> {
|
||||
const username = getUsername(ctx.exp, ctx.user);
|
||||
const buildProfile: BuildProfile<Platform.ANDROID> = ctx.buildProfile;
|
||||
const projectRootDirectory =
|
||||
@@ -53,7 +54,7 @@ export async function prepareJobAsync(
|
||||
}
|
||||
|
||||
const maybeCustomBuildConfigPath = buildProfile.config
|
||||
? getCustomBuildConfigPathForJob(buildProfile.config)
|
||||
? getCustomBuildConfigPath(buildProfile.config)
|
||||
: undefined;
|
||||
|
||||
const job: Android.Job = {
|
||||
@@ -102,8 +103,7 @@ export async function prepareJobAsync(
|
||||
path: maybeCustomBuildConfigPath,
|
||||
},
|
||||
}),
|
||||
loggerLevel: ctx.loggerLevel,
|
||||
};
|
||||
|
||||
return sanitizeBuildJob(job) as Android.Job;
|
||||
return sanitizeJob(job);
|
||||
}
|
||||
@@ -7,30 +7,36 @@ import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
|
||||
import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version';
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import Log from '../../log';
|
||||
import { isExpoUpdatesInstalled } from '../../project/projectUtils';
|
||||
import { resolveWorkflowAsync } from '../../project/workflow';
|
||||
import { syncUpdatesConfigurationAsync } from '../../update/android/UpdatesModule';
|
||||
import { Client } from '../../vcs/vcs';
|
||||
|
||||
export async function syncProjectConfigurationAsync({
|
||||
projectDir,
|
||||
exp,
|
||||
localAutoIncrement,
|
||||
vcsClient,
|
||||
}: {
|
||||
projectDir: string;
|
||||
exp: ExpoConfig;
|
||||
localAutoIncrement?: AndroidVersionAutoIncrement;
|
||||
vcsClient: Client;
|
||||
}): Promise<void> {
|
||||
export async function syncProjectConfigurationAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
{
|
||||
projectDir,
|
||||
exp,
|
||||
localAutoIncrement,
|
||||
projectId,
|
||||
vcsClient,
|
||||
}: {
|
||||
projectDir: string;
|
||||
exp: ExpoConfig;
|
||||
localAutoIncrement?: AndroidVersionAutoIncrement;
|
||||
projectId: string;
|
||||
vcsClient: Client;
|
||||
}
|
||||
): Promise<void> {
|
||||
const workflow = await resolveWorkflowAsync(projectDir, Platform.ANDROID, vcsClient);
|
||||
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement ?? false);
|
||||
|
||||
if (workflow === Workflow.GENERIC) {
|
||||
await cleanUpOldEasBuildGradleScriptAsync(projectDir);
|
||||
if (isExpoUpdatesInstalled(projectDir)) {
|
||||
await syncUpdatesConfigurationAsync(projectDir, exp, workflow);
|
||||
await syncUpdatesConfigurationAsync(graphqlClient, projectDir, exp, projectId);
|
||||
}
|
||||
await bumpVersionAsync({ projectDir, exp, bumpStrategy: versionBumpStrategy });
|
||||
} else {
|
||||
|
||||
@@ -232,9 +232,7 @@ export async function resolveRemoteVersionCodeAsync(
|
||||
applicationIdentifier: applicationId,
|
||||
storeVersion: localVersions.appVersion ?? exp.version ?? '1.0.0',
|
||||
buildVersion: currentBuildVersion,
|
||||
runtimeVersion:
|
||||
(await Updates.getRuntimeVersionNullableAsync(projectDir, exp, Platform.ANDROID)) ??
|
||||
undefined,
|
||||
runtimeVersion: Updates.getRuntimeVersionNullable(exp, Platform.ANDROID) ?? undefined,
|
||||
});
|
||||
spinner.succeed(`Initialized versionCode with ${chalk.bold(currentBuildVersion)}.`);
|
||||
} catch (err) {
|
||||
@@ -256,9 +254,7 @@ export async function resolveRemoteVersionCodeAsync(
|
||||
applicationIdentifier: applicationId,
|
||||
storeVersion: localVersions.appVersion ?? exp.version ?? '1.0.0',
|
||||
buildVersion: String(nextBuildVersion),
|
||||
runtimeVersion:
|
||||
(await Updates.getRuntimeVersionNullableAsync(projectDir, exp, Platform.ANDROID)) ??
|
||||
undefined,
|
||||
runtimeVersion: Updates.getRuntimeVersionNullable(exp, Platform.ANDROID) ?? undefined,
|
||||
});
|
||||
spinner.succeed(
|
||||
`Incremented versionCode from ${chalk.bold(currentBuildVersion)} to ${chalk.bold(
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
ArchiveSource,
|
||||
ArchiveSourceType,
|
||||
BuildJob,
|
||||
Metadata,
|
||||
Platform,
|
||||
} from '@expo/eas-build-job';
|
||||
import { ArchiveSource, ArchiveSourceType, Job, Metadata, Platform } from '@expo/eas-build-job';
|
||||
import { CredentialsSource } from '@expo/eas-json';
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
@@ -32,12 +26,7 @@ import { transformMetadata } from './graphql';
|
||||
import { LocalBuildMode, runLocalBuildAsync } from './local';
|
||||
import { collectMetadataAsync } from './metadata';
|
||||
import { printDeprecationWarnings } from './utils/printBuildInfo';
|
||||
import {
|
||||
LocalFile,
|
||||
makeProjectMetadataFileAsync,
|
||||
makeProjectTarballAsync,
|
||||
reviewAndCommitChangesAsync,
|
||||
} from './utils/repository';
|
||||
import { makeProjectTarballAsync, reviewAndCommitChangesAsync } from './utils/repository';
|
||||
import { BuildEvent } from '../analytics/AnalyticsManager';
|
||||
import { withAnalyticsAsync } from '../analytics/common';
|
||||
import { getExpoWebsiteBaseUrl } from '../api';
|
||||
@@ -76,14 +65,14 @@ export interface JobData<Credentials> {
|
||||
projectArchive: ArchiveSource;
|
||||
}
|
||||
|
||||
interface Builder<TPlatform extends Platform, Credentials, TJob extends BuildJob> {
|
||||
interface Builder<TPlatform extends Platform, Credentials, TJob extends Job> {
|
||||
ctx: BuildContext<TPlatform>;
|
||||
|
||||
ensureCredentialsAsync(
|
||||
ctx: BuildContext<TPlatform>
|
||||
): Promise<CredentialsResult<Credentials> | undefined>;
|
||||
syncProjectConfigurationAsync(ctx: BuildContext<TPlatform>): Promise<void>;
|
||||
prepareJobAsync(ctx: BuildContext<TPlatform>, jobData: JobData<Credentials>): Promise<BuildJob>;
|
||||
prepareJobAsync(ctx: BuildContext<TPlatform>, jobData: JobData<Credentials>): Promise<Job>;
|
||||
sendBuildRequestAsync(
|
||||
appId: string,
|
||||
job: TJob,
|
||||
@@ -108,7 +97,7 @@ function resolveBuildParamsInput<T extends Platform>(
|
||||
export async function prepareBuildRequestForPlatformAsync<
|
||||
TPlatform extends Platform,
|
||||
Credentials,
|
||||
TJob extends BuildJob,
|
||||
TJob extends Job,
|
||||
>(builder: Builder<TPlatform, Credentials, TJob>): Promise<BuildRequestSender> {
|
||||
const { ctx } = builder;
|
||||
const credentialsResult = await withAnalyticsAsync(
|
||||
@@ -144,10 +133,9 @@ export async function prepareBuildRequestForPlatformAsync<
|
||||
|
||||
let projectArchive: ArchiveSource | undefined;
|
||||
if (ctx.localBuildOptions.localBuildMode === LocalBuildMode.LOCAL_BUILD_PLUGIN) {
|
||||
const projectPath = (await makeProjectTarballAsync(ctx.vcsClient)).path;
|
||||
projectArchive = {
|
||||
type: ArchiveSourceType.PATH,
|
||||
path: projectPath,
|
||||
path: (await makeProjectTarballAsync(ctx.vcsClient)).path,
|
||||
};
|
||||
} else if (ctx.localBuildOptions.localBuildMode === LocalBuildMode.INTERNAL) {
|
||||
projectArchive = {
|
||||
@@ -157,7 +145,7 @@ export async function prepareBuildRequestForPlatformAsync<
|
||||
} else if (!ctx.localBuildOptions.localBuildMode) {
|
||||
projectArchive = {
|
||||
type: ArchiveSourceType.GCS,
|
||||
...(await uploadProjectAsync(ctx)),
|
||||
bucketKey: await uploadProjectAsync(ctx),
|
||||
};
|
||||
}
|
||||
assert(projectArchive);
|
||||
@@ -243,10 +231,7 @@ export function handleBuildRequestError(error: any, platform: Platform): never {
|
||||
|
||||
async function uploadProjectAsync<TPlatform extends Platform>(
|
||||
ctx: BuildContext<TPlatform>
|
||||
): Promise<{
|
||||
bucketKey: string;
|
||||
metadataLocation?: string;
|
||||
}> {
|
||||
): Promise<string> {
|
||||
let projectTarballPath;
|
||||
try {
|
||||
return await withAnalyticsAsync(
|
||||
@@ -275,6 +260,7 @@ async function uploadProjectAsync<TPlatform extends Platform>(
|
||||
}
|
||||
|
||||
projectTarballPath = projectTarball.path;
|
||||
|
||||
const bucketKey = await uploadFileAtPathToGCSAsync(
|
||||
ctx.graphqlClient,
|
||||
UploadSessionType.EasBuildGcsProjectSources,
|
||||
@@ -288,11 +274,7 @@ async function uploadProjectAsync<TPlatform extends Platform>(
|
||||
completedMessage: (duration: string) => `Uploaded to EAS ${chalk.dim(duration)}`,
|
||||
})
|
||||
);
|
||||
const { metadataLocation } = await uploadMetadataFileAsync<TPlatform>(projectTarball, ctx);
|
||||
if (metadataLocation) {
|
||||
return { bucketKey, metadataLocation };
|
||||
}
|
||||
return { bucketKey };
|
||||
return bucketKey;
|
||||
},
|
||||
{
|
||||
attemptEvent: BuildEvent.PROJECT_UPLOAD_ATTEMPT,
|
||||
@@ -303,11 +285,9 @@ async function uploadProjectAsync<TPlatform extends Platform>(
|
||||
);
|
||||
} catch (err: any) {
|
||||
let errMessage = 'Failed to upload the project tarball to EAS Build';
|
||||
|
||||
if (err.message) {
|
||||
errMessage += `\n\nReason: ${err.message}`;
|
||||
}
|
||||
|
||||
throw new EasBuildProjectArchiveUploadError(errMessage);
|
||||
} finally {
|
||||
if (projectTarballPath) {
|
||||
@@ -316,49 +296,7 @@ async function uploadProjectAsync<TPlatform extends Platform>(
|
||||
}
|
||||
}
|
||||
|
||||
async function uploadMetadataFileAsync<TPlatform extends Platform>(
|
||||
projectTarball: LocalFile,
|
||||
ctx: BuildContext<TPlatform>
|
||||
): Promise<{ metadataLocation: string | null }> {
|
||||
let projectMetadataFile: LocalFile | null = null;
|
||||
try {
|
||||
projectMetadataFile = await makeProjectMetadataFileAsync(projectTarball.path);
|
||||
|
||||
const metadataLocation = await uploadFileAtPathToGCSAsync(
|
||||
ctx.graphqlClient,
|
||||
UploadSessionType.EasBuildGcsProjectMetadata,
|
||||
projectMetadataFile.path,
|
||||
createProgressTracker({
|
||||
total: projectMetadataFile.size,
|
||||
message: ratio =>
|
||||
`Uploading metadata to EAS Build (${formatBytes(
|
||||
projectMetadataFile!.size * ratio
|
||||
)} / ${formatBytes(projectMetadataFile!.size)})`,
|
||||
completedMessage: (duration: string) => `Uploaded to EAS ${chalk.dim(duration)}`,
|
||||
})
|
||||
);
|
||||
return { metadataLocation };
|
||||
} catch (err: any) {
|
||||
let errMessage = 'Failed to upload metadata to EAS Build';
|
||||
|
||||
if (err.message) {
|
||||
errMessage += `\n\nReason: ${err.message}`;
|
||||
}
|
||||
|
||||
Log.warn(errMessage);
|
||||
return { metadataLocation: null };
|
||||
} finally {
|
||||
if (projectMetadataFile) {
|
||||
await fs.remove(projectMetadataFile.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function sendBuildRequestAsync<
|
||||
TPlatform extends Platform,
|
||||
Credentials,
|
||||
TJob extends BuildJob,
|
||||
>(
|
||||
async function sendBuildRequestAsync<TPlatform extends Platform, Credentials, TJob extends Job>(
|
||||
builder: Builder<TPlatform, Credentials, TJob>,
|
||||
job: TJob,
|
||||
metadata: Metadata,
|
||||
|
||||
@@ -40,7 +40,7 @@ async function configureAsync({
|
||||
nonInteractive,
|
||||
vcsClient,
|
||||
}: ConfigureParams): Promise<void> {
|
||||
await maybeBailOnRepoStatusAsync(vcsClient, nonInteractive);
|
||||
await maybeBailOnRepoStatusAsync(vcsClient);
|
||||
|
||||
await createEasJsonAsync(projectDir, vcsClient);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { ExpoConfig } from '@expo/config';
|
||||
import { Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { BuildProfile, EasJson } from '@expo/eas-json';
|
||||
import { LoggerLevel } from '@expo/logger';
|
||||
import { NodePackageManager } from '@expo/package-manager';
|
||||
|
||||
import { LocalBuildOptions } from './local';
|
||||
@@ -61,5 +60,4 @@ export interface BuildContext<T extends Platform> {
|
||||
developmentClient: boolean;
|
||||
requiredPackageManager: NodePackageManager['name'] | null;
|
||||
vcsClient: Client;
|
||||
loggerLevel?: LoggerLevel;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { BuildProfile, EasJson, ResourceClass } from '@expo/eas-json';
|
||||
import JsonFile from '@expo/json-file';
|
||||
import { LoggerLevel } from '@expo/logger';
|
||||
import { resolvePackageManager } from '@expo/package-manager';
|
||||
import getenv from 'getenv';
|
||||
import resolveFrom from 'resolve-from';
|
||||
@@ -40,7 +39,6 @@ export async function createBuildContextAsync<T extends Platform>({
|
||||
vcsClient,
|
||||
getDynamicPrivateProjectConfigAsync,
|
||||
customBuildConfigMetadata,
|
||||
buildLoggerLevel,
|
||||
}: {
|
||||
buildProfileName: string;
|
||||
buildProfile: BuildProfile<T>;
|
||||
@@ -59,7 +57,6 @@ export async function createBuildContextAsync<T extends Platform>({
|
||||
vcsClient: Client;
|
||||
getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn;
|
||||
customBuildConfigMetadata?: CustomBuildConfigMetadata;
|
||||
buildLoggerLevel?: LoggerLevel;
|
||||
}): Promise<BuildContext<T>> {
|
||||
const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: buildProfile.env });
|
||||
const projectName = exp.slug;
|
||||
@@ -139,7 +136,6 @@ export async function createBuildContextAsync<T extends Platform>({
|
||||
customBuildConfigMetadata,
|
||||
developmentClient,
|
||||
requiredPackageManager,
|
||||
loggerLevel: buildLoggerLevel,
|
||||
};
|
||||
if (platform === Platform.ANDROID) {
|
||||
const common = commonContext as CommonContext<Platform.ANDROID>;
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
Metadata,
|
||||
Workflow,
|
||||
} from '@expo/eas-build-job';
|
||||
import { LoggerLevel } from '@expo/logger';
|
||||
import assert from 'assert';
|
||||
|
||||
import {
|
||||
@@ -19,7 +18,6 @@ import {
|
||||
BuildTrigger as GraphQLBuildTrigger,
|
||||
ProjectArchiveSourceInput,
|
||||
ProjectArchiveSourceType,
|
||||
WorkerLoggerLevel,
|
||||
} from '../graphql/generated';
|
||||
|
||||
export function transformProjectArchive(archiveSource: ArchiveSource): ProjectArchiveSourceInput {
|
||||
@@ -27,7 +25,6 @@ export function transformProjectArchive(archiveSource: ArchiveSource): ProjectAr
|
||||
return {
|
||||
type: ProjectArchiveSourceType.Gcs,
|
||||
bucketKey: archiveSource.bucketKey,
|
||||
metadataLocation: archiveSource.metadataLocation,
|
||||
};
|
||||
} else if (archiveSource.type === ArchiveSourceType.URL) {
|
||||
return {
|
||||
@@ -110,12 +107,3 @@ export function transformBuildTrigger(buildTrigger: BuildTrigger): GraphQLBuildT
|
||||
}
|
||||
throw new Error('Unknown build trigger');
|
||||
}
|
||||
|
||||
export const loggerLevelToGraphQLWorkerLoggerLevel: Record<LoggerLevel, WorkerLoggerLevel> = {
|
||||
[LoggerLevel.TRACE]: WorkerLoggerLevel.Trace,
|
||||
[LoggerLevel.DEBUG]: WorkerLoggerLevel.Debug,
|
||||
[LoggerLevel.INFO]: WorkerLoggerLevel.Info,
|
||||
[LoggerLevel.WARN]: WorkerLoggerLevel.Warn,
|
||||
[LoggerLevel.ERROR]: WorkerLoggerLevel.Error,
|
||||
[LoggerLevel.FATAL]: WorkerLoggerLevel.Fatal,
|
||||
};
|
||||
@@ -6,7 +6,7 @@ import os from 'os';
|
||||
import type { XCBuildConfiguration } from 'xcode';
|
||||
|
||||
import { readPlistAsync } from '../../../utils/plist';
|
||||
import { resolveVcsClient } from '../../../vcs';
|
||||
import { getVcsClient } from '../../../vcs';
|
||||
import {
|
||||
BumpStrategy,
|
||||
bumpVersionAsync,
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
|
||||
jest.mock('fs');
|
||||
|
||||
const vcsClient = resolveVcsClient();
|
||||
const vcsClient = getVcsClient();
|
||||
|
||||
const getXCBuildConfigurationFromPbxproj = jest.spyOn(
|
||||
IOSConfig.Target,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Ios, Metadata, Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { Ios, Job, Metadata, Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { AppVersionSource } from '@expo/eas-json';
|
||||
|
||||
import { ensureIosCredentialsAsync } from './credentials';
|
||||
@@ -80,7 +80,7 @@ export async function prepareIosBuildAsync(
|
||||
return ensureIosCredentialsAsync(ctx, ctx.ios.targets);
|
||||
},
|
||||
syncProjectConfigurationAsync: async () => {
|
||||
await syncProjectConfigurationAsync({
|
||||
await syncProjectConfigurationAsync(ctx.graphqlClient, {
|
||||
projectDir: ctx.projectDir,
|
||||
exp: ctx.exp,
|
||||
targets: ctx.ios.targets,
|
||||
@@ -88,13 +88,14 @@ export async function prepareIosBuildAsync(
|
||||
ctx.easJsonCliConfig?.appVersionSource === AppVersionSource.REMOTE
|
||||
? false
|
||||
: ctx.buildProfile.autoIncrement,
|
||||
projectId: ctx.projectId,
|
||||
vcsClient: ctx.vcsClient,
|
||||
});
|
||||
},
|
||||
prepareJobAsync: async (
|
||||
ctx: BuildContext<Platform.IOS>,
|
||||
jobData: JobData<IosCredentials>
|
||||
): Promise<Ios.Job> => {
|
||||
): Promise<Job> => {
|
||||
return await prepareJobAsync(ctx, {
|
||||
...jobData,
|
||||
buildScheme: ctx.ios.xcodeBuildContext.buildScheme,
|
||||
|
||||
@@ -3,7 +3,6 @@ import nullthrows from 'nullthrows';
|
||||
|
||||
import { IosJobInput, IosJobSecretsInput } from '../../graphql/generated';
|
||||
import {
|
||||
loggerLevelToGraphQLWorkerLoggerLevel,
|
||||
transformBuildMode,
|
||||
transformBuildTrigger,
|
||||
transformProjectArchive,
|
||||
@@ -32,9 +31,6 @@ export function transformJob(job: Ios.Job): IosJobInput {
|
||||
experimental: job.experimental,
|
||||
mode: transformBuildMode(job.mode),
|
||||
customBuildConfig: job.customBuildConfig,
|
||||
loggerLevel: job.loggerLevel
|
||||
? loggerLevelToGraphQLWorkerLoggerLevel[job.loggerLevel]
|
||||
: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@ import {
|
||||
BuildMode,
|
||||
BuildTrigger,
|
||||
Ios,
|
||||
Job,
|
||||
Platform,
|
||||
sanitizeBuildJob,
|
||||
sanitizeJob,
|
||||
} from '@expo/eas-build-job';
|
||||
import { BuildProfile } from '@expo/eas-json';
|
||||
import nullthrows from 'nullthrows';
|
||||
@@ -13,7 +14,7 @@ import slash from 'slash';
|
||||
|
||||
import { IosCredentials, TargetCredentials } from '../../credentials/ios/types';
|
||||
import { IosJobSecretsInput } from '../../graphql/generated';
|
||||
import { getCustomBuildConfigPathForJob } from '../../project/customBuildConfig';
|
||||
import { getCustomBuildConfigPath } from '../../project/customBuildConfig';
|
||||
import { getUsername } from '../../project/projectUtils';
|
||||
import { BuildContext } from '../context';
|
||||
|
||||
@@ -31,7 +32,7 @@ const cacheDefaults = {
|
||||
export async function prepareJobAsync(
|
||||
ctx: BuildContext<Platform.IOS>,
|
||||
jobData: JobData
|
||||
): Promise<Ios.Job> {
|
||||
): Promise<Job> {
|
||||
const username = getUsername(ctx.exp, ctx.user);
|
||||
const buildProfile: BuildProfile<Platform.IOS> = ctx.buildProfile;
|
||||
const projectRootDirectory =
|
||||
@@ -45,7 +46,7 @@ export async function prepareJobAsync(
|
||||
}
|
||||
|
||||
const maybeCustomBuildConfigPath = buildProfile.config
|
||||
? getCustomBuildConfigPathForJob(buildProfile.config)
|
||||
? getCustomBuildConfigPath(buildProfile.config)
|
||||
: undefined;
|
||||
|
||||
const job: Ios.Job = {
|
||||
@@ -97,9 +98,8 @@ export async function prepareJobAsync(
|
||||
path: maybeCustomBuildConfigPath,
|
||||
},
|
||||
}),
|
||||
loggerLevel: ctx.loggerLevel,
|
||||
};
|
||||
return sanitizeBuildJob(job) as Ios.Job;
|
||||
return sanitizeJob(job);
|
||||
}
|
||||
|
||||
export function prepareCredentialsToResign(credentials: IosCredentials): IosJobSecretsInput {
|
||||
|
||||
@@ -3,31 +3,37 @@ import { Platform, Workflow } from '@expo/eas-build-job';
|
||||
import { IosVersionAutoIncrement } from '@expo/eas-json';
|
||||
|
||||
import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from './version';
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { Target } from '../../credentials/ios/types';
|
||||
import { isExpoUpdatesInstalled } from '../../project/projectUtils';
|
||||
import { resolveWorkflowAsync } from '../../project/workflow';
|
||||
import { syncUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule';
|
||||
import { Client } from '../../vcs/vcs';
|
||||
|
||||
export async function syncProjectConfigurationAsync({
|
||||
projectDir,
|
||||
exp,
|
||||
targets,
|
||||
localAutoIncrement,
|
||||
vcsClient,
|
||||
}: {
|
||||
projectDir: string;
|
||||
exp: ExpoConfig;
|
||||
targets: Target[];
|
||||
localAutoIncrement?: IosVersionAutoIncrement;
|
||||
vcsClient: Client;
|
||||
}): Promise<void> {
|
||||
export async function syncProjectConfigurationAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
{
|
||||
projectDir,
|
||||
exp,
|
||||
targets,
|
||||
localAutoIncrement,
|
||||
projectId,
|
||||
vcsClient,
|
||||
}: {
|
||||
projectDir: string;
|
||||
exp: ExpoConfig;
|
||||
targets: Target[];
|
||||
localAutoIncrement?: IosVersionAutoIncrement;
|
||||
projectId: string;
|
||||
vcsClient: Client;
|
||||
}
|
||||
): Promise<void> {
|
||||
const workflow = await resolveWorkflowAsync(projectDir, Platform.IOS, vcsClient);
|
||||
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement ?? false);
|
||||
|
||||
if (workflow === Workflow.GENERIC) {
|
||||
if (isExpoUpdatesInstalled(projectDir)) {
|
||||
await syncUpdatesConfigurationAsync(vcsClient, projectDir, exp, workflow);
|
||||
await syncUpdatesConfigurationAsync(graphqlClient, vcsClient, projectDir, exp, projectId);
|
||||
}
|
||||
await bumpVersionAsync({ projectDir, exp, bumpStrategy: versionBumpStrategy, targets });
|
||||
} else {
|
||||
|
||||
@@ -342,9 +342,7 @@ export async function resolveRemoteBuildNumberAsync(
|
||||
applicationIdentifier: applicationTarget.bundleIdentifier,
|
||||
storeVersion: localShortVersion ?? '1.0.0',
|
||||
buildVersion: currentBuildVersion,
|
||||
runtimeVersion:
|
||||
(await Updates.getRuntimeVersionNullableAsync(projectDir, exp, Platform.IOS)) ??
|
||||
undefined,
|
||||
runtimeVersion: Updates.getRuntimeVersionNullable(exp, Platform.IOS) ?? undefined,
|
||||
});
|
||||
spinner.succeed(`Initialized buildNumber with ${chalk.bold(currentBuildVersion)}.`);
|
||||
} catch (err) {
|
||||
@@ -366,9 +364,7 @@ export async function resolveRemoteBuildNumberAsync(
|
||||
applicationIdentifier: applicationTarget.bundleIdentifier,
|
||||
storeVersion: localShortVersion ?? '1.0.0',
|
||||
buildVersion: nextBuildVersion,
|
||||
runtimeVersion:
|
||||
(await Updates.getRuntimeVersionNullableAsync(projectDir, exp, Platform.IOS)) ??
|
||||
undefined,
|
||||
runtimeVersion: Updates.getRuntimeVersionNullable(exp, Platform.IOS) ?? undefined,
|
||||
});
|
||||
spinner.succeed(
|
||||
`Incremented buildNumber from ${chalk.bold(currentBuildVersion)} to ${chalk.bold(
|
||||
|
||||
@@ -6,7 +6,7 @@ import semver from 'semver';
|
||||
import { ora } from '../ora';
|
||||
|
||||
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
||||
const PLUGIN_PACKAGE_VERSION = '1.0.102';
|
||||
const PLUGIN_PACKAGE_VERSION = '1.0.56';
|
||||
|
||||
export enum LocalBuildMode {
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Updates } from '@expo/config-plugins';
|
||||
import { Metadata, Platform, sanitizeMetadata } from '@expo/eas-build-job';
|
||||
import { IosEnterpriseProvisioning } from '@expo/eas-json';
|
||||
import fs from 'fs-extra';
|
||||
@@ -7,14 +8,8 @@ import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from '.
|
||||
import { BuildContext } from './context';
|
||||
import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version';
|
||||
import { LocalBuildMode } from './local';
|
||||
import { BuildDistributionType } from './types';
|
||||
import Log from '../log';
|
||||
import {
|
||||
getUsername,
|
||||
isClassicUpdatesSupportedAsync,
|
||||
isExpoUpdatesInstalled,
|
||||
} from '../project/projectUtils';
|
||||
import { resolveRuntimeVersionAsync } from '../project/resolveRuntimeVersionAsync';
|
||||
import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils';
|
||||
import {
|
||||
readChannelSafelyAsync as readAndroidChannelSafelyAsync,
|
||||
readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync,
|
||||
@@ -29,7 +24,10 @@ export async function collectMetadataAsync<T extends Platform>(
|
||||
ctx: BuildContext<T>
|
||||
): Promise<Metadata> {
|
||||
const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
|
||||
const distribution = ctx.buildProfile.distribution ?? BuildDistributionType.STORE;
|
||||
const distribution =
|
||||
('simulator' in ctx.buildProfile && ctx.buildProfile.simulator
|
||||
? 'simulator'
|
||||
: ctx.buildProfile.distribution) ?? 'store';
|
||||
const metadata: Metadata = {
|
||||
trackingContext: ctx.analyticsEventProperties,
|
||||
...(await maybeResolveVersionsAsync(ctx)),
|
||||
@@ -37,7 +35,7 @@ export async function collectMetadataAsync<T extends Platform>(
|
||||
workflow: ctx.workflow,
|
||||
credentialsSource: ctx.buildProfile.credentialsSource,
|
||||
sdkVersion: ctx.exp.sdkVersion,
|
||||
runtimeVersion: (await resolveRuntimeVersionAsync(ctx)) ?? undefined,
|
||||
runtimeVersion: Updates.getRuntimeVersionNullable(ctx.exp, ctx.platform) ?? undefined,
|
||||
reactNativeVersion: await getReactNativeVersionAsync(ctx.projectDir),
|
||||
...channelOrReleaseChannel,
|
||||
distribution,
|
||||
@@ -66,7 +64,6 @@ export async function collectMetadataAsync<T extends Platform>(
|
||||
requiredPackageManager: ctx.requiredPackageManager ?? undefined,
|
||||
selectedImage: ctx.buildProfile.image,
|
||||
customNodeVersion: ctx.buildProfile.node,
|
||||
simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator,
|
||||
};
|
||||
return sanitizeMetadata(metadata);
|
||||
}
|
||||
@@ -126,19 +123,13 @@ async function resolveChannelOrReleaseChannelAsync<T extends Platform>(
|
||||
if (ctx.buildProfile.channel) {
|
||||
return { channel: ctx.buildProfile.channel };
|
||||
}
|
||||
if (ctx.buildProfile.releaseChannel) {
|
||||
return { releaseChannel: ctx.buildProfile.releaseChannel };
|
||||
}
|
||||
const channel = await getNativeChannelAsync(ctx);
|
||||
if (channel) {
|
||||
return { channel };
|
||||
}
|
||||
|
||||
if (!(await isClassicUpdatesSupportedAsync(ctx.projectDir))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (ctx.buildProfile.releaseChannel) {
|
||||
return { releaseChannel: ctx.buildProfile.releaseChannel };
|
||||
}
|
||||
|
||||
const releaseChannel = await getNativeReleaseChannelAsync(ctx);
|
||||
return { releaseChannel };
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
ResourceClass,
|
||||
SubmitProfile,
|
||||
} from '@expo/eas-json';
|
||||
import { LoggerLevel } from '@expo/logger';
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
import nullthrows from 'nullthrows';
|
||||
@@ -20,7 +19,7 @@ import { ensureProjectConfiguredAsync } from './configure';
|
||||
import { BuildContext } from './context';
|
||||
import { createBuildContextAsync } from './createContext';
|
||||
import { prepareIosBuildAsync } from './ios/build';
|
||||
import { LocalBuildMode, LocalBuildOptions } from './local';
|
||||
import { LocalBuildOptions } from './local';
|
||||
import { ensureExpoDevClientInstalledForDevClientBuildsAsync } from './utils/devClient';
|
||||
import { printBuildResults, printLogsUrls } from './utils/printBuildInfo';
|
||||
import { ensureRepoIsCleanAsync } from './utils/repository';
|
||||
@@ -94,7 +93,6 @@ export interface BuildFlags {
|
||||
localBuildOptions: LocalBuildOptions;
|
||||
resourceClass?: ResourceClass;
|
||||
message?: string;
|
||||
buildLoggerLevel?: LoggerLevel;
|
||||
}
|
||||
|
||||
export async function runBuildAndSubmitAsync(
|
||||
@@ -134,36 +132,6 @@ export async function runBuildAndSubmitAsync(
|
||||
}. ${learnMore('https://docs.expo.dev/build-reference/variables/')}`
|
||||
);
|
||||
|
||||
for (const buildProfile of buildProfiles) {
|
||||
if (buildProfile.profile.image && ['default', 'stable'].includes(buildProfile.profile.image)) {
|
||||
Log.warn(
|
||||
`The "image" field in the build profile "${buildProfile.profileName}" is set to "${buildProfile.profile.image}". This tag is deprecated and will be removed in the future. Use other images or tags listed here: https://docs.expo.dev/build-reference/infrastructure/`
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
buildProfile.profile.image &&
|
||||
[
|
||||
'macos-monterey-12.4-xcode-13.4',
|
||||
'macos-monterey-12.3-xcode-13.3',
|
||||
'macos-monterey-12.1-xcode-13.2',
|
||||
'macos-ventura-13.4-xcode-14.3.1',
|
||||
'macos-ventura-13.3-xcode-14.3',
|
||||
'macos-monterey-12.6-xcode-14.2',
|
||||
'macos-monterey-12.6-xcode-14.1',
|
||||
'macos-monterey-12.6-xcode-14.0',
|
||||
].includes(buildProfile.profile.image)
|
||||
) {
|
||||
Log.warn(
|
||||
`The "image" field in the build profile "${buildProfile.profileName}" is set to "${
|
||||
buildProfile.profile.image
|
||||
}". This image is using Xcode in version lower then 15. Apple's new requirement states that starting on April 29th, 2024, apps uploaded to App Store Connect must be built with Xcode 15 for iOS 17, iPadOS 17, tvOS 17, or watchOS 10. Start using Xcode 15 image today by setting "macos-sonoma-14.4-xcode-15.3" or "latest" as your image value. This image will be removed from EAS Build on May 29th, 2024. ${learnMore(
|
||||
'https://expo.dev/changelog/2024/03-29-eas-build-upcoming-ios-images-updates'
|
||||
)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await ensureExpoDevClientInstalledForDevClientBuildsAsync({
|
||||
projectDir,
|
||||
nonInteractive: flags.nonInteractive,
|
||||
@@ -212,23 +180,13 @@ export async function runBuildAndSubmitAsync(
|
||||
buildCtxByPlatform[platform] = buildCtx;
|
||||
}
|
||||
|
||||
if (flags.localBuildOptions.localBuildMode === LocalBuildMode.LOCAL_BUILD_PLUGIN) {
|
||||
if (flags.localBuildOptions.localBuildMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags.localBuildOptions.localBuildMode === LocalBuildMode.INTERNAL) {
|
||||
const startedBuild = await BuildQuery.byIdAsync(
|
||||
graphqlClient,
|
||||
nullthrows(process.env.EAS_BUILD_ID, 'EAS_BUILD_ID is not defined')
|
||||
);
|
||||
startedBuilds.push({ build: startedBuild, buildProfile: buildProfiles[0] });
|
||||
}
|
||||
|
||||
if (!flags.localBuildOptions.localBuildMode) {
|
||||
Log.newLine();
|
||||
printLogsUrls(startedBuilds.map(startedBuild => startedBuild.build));
|
||||
Log.newLine();
|
||||
}
|
||||
Log.newLine();
|
||||
printLogsUrls(startedBuilds.map(startedBuild => startedBuild.build));
|
||||
Log.newLine();
|
||||
|
||||
const submissions: SubmissionFragment[] = [];
|
||||
if (flags.autoSubmit) {
|
||||
@@ -261,15 +219,9 @@ export async function runBuildAndSubmitAsync(
|
||||
submissions.push(submission);
|
||||
}
|
||||
|
||||
if (!flags.localBuildOptions.localBuildMode) {
|
||||
Log.newLine();
|
||||
printSubmissionDetailsUrls(submissions);
|
||||
Log.newLine();
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.localBuildOptions.localBuildMode) {
|
||||
return;
|
||||
Log.newLine();
|
||||
printSubmissionDetailsUrls(submissions);
|
||||
Log.newLine();
|
||||
}
|
||||
|
||||
if (!flags.wait) {
|
||||
@@ -362,7 +314,6 @@ async function prepareAndStartBuildAsync({
|
||||
vcsClient,
|
||||
getDynamicPrivateProjectConfigAsync,
|
||||
customBuildConfigMetadata,
|
||||
buildLoggerLevel: flags.buildLoggerLevel,
|
||||
});
|
||||
|
||||
if (moreBuilds) {
|
||||
@@ -383,6 +334,7 @@ async function prepareAndStartBuildAsync({
|
||||
);
|
||||
if (buildProfile.profile.channel) {
|
||||
await validateExpoUpdatesInstalledAsProjectDependencyAsync({
|
||||
graphqlClient,
|
||||
exp: buildCtx.exp,
|
||||
projectId: buildCtx.projectId,
|
||||
projectDir,
|
||||
@@ -470,7 +422,6 @@ async function prepareAndStartSubmissionAsync({
|
||||
projectId: buildCtx.projectId,
|
||||
exp: buildCtx.exp,
|
||||
vcsClient: buildCtx.vcsClient,
|
||||
isVerboseFastlaneEnabled: false,
|
||||
});
|
||||
|
||||
if (moreBuilds) {
|
||||
@@ -528,6 +479,7 @@ async function maybeDownloadAndRunSimulatorBuildsAsync(
|
||||
|
||||
async function validateExpoUpdatesInstalledAsProjectDependencyAsync({
|
||||
exp,
|
||||
graphqlClient,
|
||||
projectId,
|
||||
projectDir,
|
||||
vcsClient,
|
||||
@@ -535,6 +487,7 @@ async function validateExpoUpdatesInstalledAsProjectDependencyAsync({
|
||||
nonInteractive,
|
||||
sdkVersion,
|
||||
}: {
|
||||
graphqlClient: ExpoGraphqlClient;
|
||||
exp: ExpoConfig;
|
||||
projectId: string;
|
||||
projectDir: string;
|
||||
@@ -563,7 +516,7 @@ async function validateExpoUpdatesInstalledAsProjectDependencyAsync({
|
||||
message: `Would you like to install the "expo-updates" package and configure EAS Update now?`,
|
||||
});
|
||||
if (installExpoUpdates) {
|
||||
await ensureEASUpdateIsConfiguredAsync({
|
||||
await ensureEASUpdateIsConfiguredAsync(graphqlClient, {
|
||||
exp,
|
||||
projectId,
|
||||
projectDir,
|
||||
|
||||
@@ -11,6 +11,5 @@ export enum BuildStatus {
|
||||
export enum BuildDistributionType {
|
||||
STORE = 'store',
|
||||
INTERNAL = 'internal',
|
||||
/** @deprecated Use simulator flag instead */
|
||||
SIMULATOR = 'simulator',
|
||||
}
|
||||
@@ -12,10 +12,7 @@ import { getTmpDirectory } from '../../utils/paths';
|
||||
import { endTimer, formatMilliseconds, startTimer } from '../../utils/timer';
|
||||
import { Client } from '../../vcs/vcs';
|
||||
|
||||
export async function maybeBailOnRepoStatusAsync(
|
||||
vcsClient: Client,
|
||||
nonInteractive: boolean
|
||||
): Promise<void> {
|
||||
export async function maybeBailOnRepoStatusAsync(vcsClient: Client): Promise<void> {
|
||||
if (!(await vcsClient.isCommitRequiredAsync())) {
|
||||
return;
|
||||
}
|
||||
@@ -31,11 +28,6 @@ export async function maybeBailOnRepoStatusAsync(
|
||||
});
|
||||
|
||||
if (!answer) {
|
||||
if (nonInteractive) {
|
||||
Log.log('The following files need to be committed:');
|
||||
await vcsClient.showChangedFilesAsync();
|
||||
}
|
||||
|
||||
throw new Error('Commit all changes. Aborting...');
|
||||
}
|
||||
}
|
||||
@@ -55,9 +47,6 @@ export async function ensureRepoIsCleanAsync(
|
||||
)}.`
|
||||
);
|
||||
if (nonInteractive) {
|
||||
Log.log('The following files need to be committed:');
|
||||
await vcsClient.showChangedFilesAsync();
|
||||
|
||||
throw new Error('Commit all changes. Aborting...');
|
||||
}
|
||||
const answer = await confirmAsync({
|
||||
@@ -94,55 +83,9 @@ export async function commitPromptAsync(
|
||||
});
|
||||
}
|
||||
|
||||
export type LocalFile = {
|
||||
path: string;
|
||||
size: number;
|
||||
};
|
||||
|
||||
export async function makeProjectMetadataFileAsync(archivePath: string): Promise<LocalFile> {
|
||||
const spinner = ora('Creating project metadata file');
|
||||
const timerLabel = 'makeProjectMetadataFileAsync';
|
||||
const timer = setTimeout(
|
||||
() => {
|
||||
spinner.start();
|
||||
},
|
||||
Log.isDebug ? 1 : 1000
|
||||
);
|
||||
startTimer(timerLabel);
|
||||
|
||||
const metadataLocation = path.join(getTmpDirectory(), `${uuidv4()}-eas-build-metadata.json`);
|
||||
const archiveContent: string[] = [];
|
||||
|
||||
try {
|
||||
await tar.list({
|
||||
file: archivePath,
|
||||
onentry: (entry: tar.ReadEntry) => {
|
||||
if (entry.type === 'File' && !entry.path.includes('.git/')) {
|
||||
archiveContent.push(entry.path);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
await fs.writeJSON(metadataLocation, {
|
||||
archiveContent,
|
||||
});
|
||||
} catch (e) {
|
||||
clearTimeout(timer);
|
||||
if (spinner.isSpinning) {
|
||||
spinner.fail();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
clearTimeout(timer);
|
||||
|
||||
const duration = endTimer(timerLabel);
|
||||
const prettyTime = formatMilliseconds(duration);
|
||||
spinner.succeed(`Created project metadata file ${chalk.dim(prettyTime)}`);
|
||||
|
||||
return { path: metadataLocation, size: await fs.stat(metadataLocation).then(stat => stat.size) };
|
||||
}
|
||||
|
||||
export async function makeProjectTarballAsync(vcsClient: Client): Promise<LocalFile> {
|
||||
export async function makeProjectTarballAsync(
|
||||
vcsClient: Client
|
||||
): Promise<{ path: string; size: number }> {
|
||||
const spinner = ora('Compressing project files');
|
||||
|
||||
await fs.mkdirp(getTmpDirectory());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Command } from '@oclif/core';
|
||||
import { CombinedError } from '@urql/core';
|
||||
import chalk from 'chalk';
|
||||
import { GraphQLError } from 'graphql/error';
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
@@ -25,7 +24,6 @@ import {
|
||||
} from '../analytics/AnalyticsManager';
|
||||
import Log from '../log';
|
||||
import SessionManager from '../user/SessionManager';
|
||||
import { Client } from '../vcs/vcs';
|
||||
|
||||
export type ContextInput<
|
||||
T extends {
|
||||
@@ -141,7 +139,7 @@ export default abstract class EasCommand extends Command {
|
||||
} = object,
|
||||
>(
|
||||
commandClass: { contextDefinition: ContextInput<C> },
|
||||
{ nonInteractive, vcsClientOverride }: { nonInteractive: boolean; vcsClientOverride?: Client }
|
||||
{ nonInteractive }: { nonInteractive: boolean }
|
||||
): Promise<ContextOutput<C>> {
|
||||
const contextDefinition = commandClass.contextDefinition;
|
||||
|
||||
@@ -154,7 +152,6 @@ export default abstract class EasCommand extends Command {
|
||||
nonInteractive,
|
||||
sessionManager: this.sessionManager,
|
||||
analytics: this.analytics,
|
||||
vcsClientOverride,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
@@ -211,13 +208,7 @@ export default abstract class EasCommand extends Command {
|
||||
const defaultMsg = `${messageLine}${requestIdLine}`;
|
||||
|
||||
if (graphQLError.extensions?.errorCode === 'UNAUTHORIZED_ERROR') {
|
||||
return `${chalk.bold(
|
||||
`You don't have the required permissions to perform this operation.`
|
||||
)}\n\nThis can sometimes happen if you are logged in as incorrect user.\nRun ${chalk.bold(
|
||||
'eas whoami'
|
||||
)} to check the username you are logged in as.\nRun ${chalk.bold(
|
||||
'eas login'
|
||||
)} to change the account.\n\nOriginal error message: ${defaultMsg}`;
|
||||
return `You don't have the required permissions to perform this operation.\n\n${defaultMsg}`;
|
||||
}
|
||||
|
||||
return defaultMsg;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { Analytics } from '../../analytics/AnalyticsManager';
|
||||
import SessionManager from '../../user/SessionManager';
|
||||
import { Client } from '../../vcs/vcs';
|
||||
|
||||
export interface ContextOptions {
|
||||
sessionManager: SessionManager;
|
||||
analytics: Analytics;
|
||||
nonInteractive: boolean;
|
||||
vcsClientOverride?: Client;
|
||||
}
|
||||
|
||||
export default abstract class ContextField<T> {
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
import { EasJsonAccessor, EasJsonUtils } from '@expo/eas-json';
|
||||
|
||||
import ContextField from './ContextField';
|
||||
import { findProjectDirAndVerifyProjectSetupAsync } from './contextUtils/findProjectDirAndVerifyProjectSetupAsync';
|
||||
import { resolveVcsClient } from '../../vcs';
|
||||
import { getVcsClient } from '../../vcs';
|
||||
import { Client } from '../../vcs/vcs';
|
||||
|
||||
export default class VcsClientContextField extends ContextField<Client> {
|
||||
async getValueAsync({ vcsClientOverride }: { vcsClientOverride?: Client }): Promise<Client> {
|
||||
if (vcsClientOverride) {
|
||||
return vcsClientOverride;
|
||||
}
|
||||
const projectDir = await findProjectDirAndVerifyProjectSetupAsync();
|
||||
const easJsonAccessor = EasJsonAccessor.fromProjectPath(projectDir);
|
||||
const config = await EasJsonUtils.getCliConfigAsync(easJsonAccessor);
|
||||
return resolveVcsClient(config?.requireCommit);
|
||||
async getValueAsync(): Promise<Client> {
|
||||
return getVcsClient();
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -8,20 +8,20 @@ import semver from 'semver';
|
||||
|
||||
import { learnMore } from '../../../log';
|
||||
import { easCliVersion } from '../../../utils/easCli';
|
||||
import { resolveVcsClient } from '../../../vcs';
|
||||
import { getVcsClient, setVcsClient } from '../../../vcs';
|
||||
import GitClient from '../../../vcs/clients/git';
|
||||
|
||||
async function applyCliConfigAsync(projectDir: string): Promise<void> {
|
||||
const easJsonAccessor = EasJsonAccessor.fromProjectPath(projectDir);
|
||||
const config = await EasJsonUtils.getCliConfigAsync(easJsonAccessor);
|
||||
if (config?.version && !semver.satisfies(easCliVersion, config.version)) {
|
||||
throw new Error(
|
||||
`You are on eas-cli@${easCliVersion} which does not satisfy the CLI version constraint defined in eas.json (${
|
||||
config.version
|
||||
}).\n\nThis error probably means that you need update your eas-cli to a newer version.\nRun ${chalk.bold(
|
||||
'npm install -g eas-cli'
|
||||
)} to update the eas-cli to the latest version.`
|
||||
`You are on eas-cli@${easCliVersion} which does not satisfy the CLI version constraint in eas.json (${config.version})`
|
||||
);
|
||||
}
|
||||
if (config?.requireCommit) {
|
||||
setVcsClient(new GitClient());
|
||||
}
|
||||
}
|
||||
|
||||
async function ensureEasCliIsNotInDependenciesAsync(projectDir: string): Promise<void> {
|
||||
@@ -92,7 +92,7 @@ export async function findProjectRootAsync({
|
||||
} else {
|
||||
let vcsRoot;
|
||||
try {
|
||||
vcsRoot = path.normalize(await resolveVcsClient().getRootPathAsync());
|
||||
vcsRoot = path.normalize(await getVcsClient().getRootPathAsync());
|
||||
} catch {}
|
||||
if (vcsRoot && vcsRoot.startsWith(projectRootDir) && vcsRoot !== projectRootDir) {
|
||||
throw new Error(
|
||||
|
||||
@@ -13,6 +13,7 @@ export default class AccountLogin extends EasCommand {
|
||||
description: 'Login with SSO',
|
||||
char: 's',
|
||||
default: false,
|
||||
hidden: true,
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@ import { isExpoUpdatesInstalled, isUsingEASUpdate } from '../../project/projectU
|
||||
import { resolveWorkflowAsync } from '../../project/workflow';
|
||||
import { promptAsync } from '../../prompts';
|
||||
import { syncUpdatesConfigurationAsync as syncAndroidUpdatesConfigurationAsync } from '../../update/android/UpdatesModule';
|
||||
import { ensureEASUpdateIsConfiguredInEasJsonAsync } from '../../update/configure';
|
||||
import {
|
||||
ensureEASUpdateIsConfiguredInEasJsonAsync,
|
||||
ensureUseClassicUpdatesIsRemovedAsync,
|
||||
} from '../../update/configure';
|
||||
import { syncUpdatesConfigurationAsync as syncIosUpdatesConfigurationAsync } from '../../update/ios/UpdatesModule';
|
||||
|
||||
export default class BuildConfigure extends EasCommand {
|
||||
@@ -35,6 +38,7 @@ export default class BuildConfigure extends EasCommand {
|
||||
const { flags } = await this.parse(BuildConfigure);
|
||||
const {
|
||||
privateProjectConfig: { exp, projectId, projectDir },
|
||||
loggedIn: { graphqlClient },
|
||||
vcsClient,
|
||||
} = await this.getContextAsync(BuildConfigure, {
|
||||
nonInteractive: false,
|
||||
@@ -66,6 +70,12 @@ export default class BuildConfigure extends EasCommand {
|
||||
vcsClient,
|
||||
});
|
||||
if (didCreateEasJson && isUsingEASUpdate(exp, projectId)) {
|
||||
if (exp.updates?.useClassicUpdates) {
|
||||
// NOTE: this method modifies the Expo config; be sure to use this function's return value
|
||||
// if the config object is used later in the future
|
||||
await ensureUseClassicUpdatesIsRemovedAsync({ exp, projectDir });
|
||||
}
|
||||
|
||||
await ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir);
|
||||
}
|
||||
|
||||
@@ -74,14 +84,20 @@ export default class BuildConfigure extends EasCommand {
|
||||
if ([RequestedPlatform.Android, RequestedPlatform.All].includes(platform)) {
|
||||
const workflow = await resolveWorkflowAsync(projectDir, Platform.ANDROID, vcsClient);
|
||||
if (workflow === Workflow.GENERIC) {
|
||||
await syncAndroidUpdatesConfigurationAsync(projectDir, exp, workflow);
|
||||
await syncAndroidUpdatesConfigurationAsync(graphqlClient, projectDir, exp, projectId);
|
||||
}
|
||||
}
|
||||
|
||||
if ([RequestedPlatform.Ios, RequestedPlatform.All].includes(platform)) {
|
||||
const workflow = await resolveWorkflowAsync(projectDir, Platform.IOS, vcsClient);
|
||||
if (workflow === Workflow.GENERIC) {
|
||||
await syncIosUpdatesConfigurationAsync(vcsClient, projectDir, exp, workflow);
|
||||
await syncIosUpdatesConfigurationAsync(
|
||||
graphqlClient,
|
||||
vcsClient,
|
||||
projectDir,
|
||||
exp,
|
||||
projectId
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { EasJsonAccessor, EasJsonUtils, ResourceClass } from '@expo/eas-json';
|
||||
import { LoggerLevel } from '@expo/logger';
|
||||
import { Errors, Flags } from '@oclif/core';
|
||||
import chalk from 'chalk';
|
||||
import figures from 'figures';
|
||||
@@ -34,7 +33,6 @@ interface RawBuildFlags {
|
||||
'auto-submit-with-profile'?: string;
|
||||
'resource-class'?: ResourceClass;
|
||||
message?: string;
|
||||
'build-logger-level'?: LoggerLevel;
|
||||
}
|
||||
|
||||
export default class Build extends EasCommand {
|
||||
@@ -100,10 +98,6 @@ export default class Build extends EasCommand {
|
||||
char: 'm',
|
||||
description: 'A short message describing the build',
|
||||
}),
|
||||
'build-logger-level': Flags.enum({
|
||||
description: 'The level of logs to output during the build process. Defaults to "info".',
|
||||
options: Object.values(LoggerLevel),
|
||||
}),
|
||||
...EasNonInteractiveAndJsonFlags,
|
||||
};
|
||||
|
||||
@@ -216,7 +210,6 @@ export default class Build extends EasCommand {
|
||||
submitProfile: flags['auto-submit-with-profile'] ?? profile,
|
||||
resourceClass: flags['resource-class'],
|
||||
message,
|
||||
buildLoggerLevel: flags['build-logger-level'],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { runBuildAndSubmitAsync } from '../../build/runBuildAndSubmit';
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { RequestedPlatform } from '../../platform';
|
||||
import { enableJsonOutput } from '../../utils/json';
|
||||
import { setVcsClient } from '../../vcs';
|
||||
import GitNoCommitClient from '../../vcs/clients/gitNoCommit';
|
||||
|
||||
/**
|
||||
@@ -29,17 +30,6 @@ export default class BuildInternal extends EasCommand {
|
||||
'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
||||
helpValue: 'PROFILE_NAME',
|
||||
}),
|
||||
'auto-submit': Flags.boolean({
|
||||
default: false,
|
||||
description:
|
||||
'Submit on build complete using the submit profile with the same name as the build profile',
|
||||
exclusive: ['auto-submit-with-profile'],
|
||||
}),
|
||||
'auto-submit-with-profile': Flags.string({
|
||||
description: 'Submit on build complete using the submit profile with provided name',
|
||||
helpValue: 'PROFILE_NAME',
|
||||
exclusive: ['auto-submit'],
|
||||
}),
|
||||
};
|
||||
|
||||
static override contextDefinition = {
|
||||
@@ -63,9 +53,10 @@ export default class BuildInternal extends EasCommand {
|
||||
vcsClient,
|
||||
} = await this.getContextAsync(BuildInternal, {
|
||||
nonInteractive: true,
|
||||
vcsClientOverride: new GitNoCommitClient(),
|
||||
});
|
||||
|
||||
setVcsClient(new GitNoCommitClient());
|
||||
|
||||
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
||||
|
||||
await runBuildAndSubmitAsync(
|
||||
@@ -80,11 +71,10 @@ export default class BuildInternal extends EasCommand {
|
||||
wait: false,
|
||||
clearCache: false,
|
||||
json: true,
|
||||
autoSubmit: flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined,
|
||||
autoSubmit: false,
|
||||
localBuildOptions: {
|
||||
localBuildMode: LocalBuildMode.INTERNAL,
|
||||
},
|
||||
submitProfile: flags['auto-submit-with-profile'] ?? flags.profile,
|
||||
},
|
||||
actor,
|
||||
getDynamicPrivateProjectConfigAsync
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
getPaginatedQueryOptions,
|
||||
} from '../../commandUtils/pagination';
|
||||
import { AppPlatform, BuildStatus as GraphQLBuildStatus } from '../../graphql/generated';
|
||||
import Log from '../../log';
|
||||
import { RequestedPlatform } from '../../platform';
|
||||
import { getDisplayNameForProjectIdAsync } from '../../project/projectUtils';
|
||||
import { buildDistributionTypeToGraphQLDistributionType } from '../../utils/buildDistribution';
|
||||
@@ -52,10 +51,6 @@ export default class BuildList extends EasCommand {
|
||||
...EasPaginatedQueryFlags,
|
||||
limit: getLimitFlagWithCustomValues({ defaultTo: 10, limit: BUILDS_LIMIT }),
|
||||
...EasNonInteractiveAndJsonFlags,
|
||||
simulator: Flags.boolean({
|
||||
description:
|
||||
'Filter only iOS simulator builds. Can only be used with --platform flag set to "ios"',
|
||||
}),
|
||||
};
|
||||
|
||||
static override contextDefinition = {
|
||||
@@ -74,17 +69,6 @@ export default class BuildList extends EasCommand {
|
||||
distribution: buildDistribution,
|
||||
'non-interactive': nonInteractive,
|
||||
} = flags;
|
||||
if (buildDistribution === BuildDistributionType.SIMULATOR) {
|
||||
Log.warn(
|
||||
`Using --distribution flag with "simulator" value is deprecated - use --simulator flag instead`
|
||||
);
|
||||
}
|
||||
if (flags.simulator && requestedPlatform !== RequestedPlatform.Ios) {
|
||||
Log.error(
|
||||
`The --simulator flag is only usable with --platform flag set to "ios", as it is used to filter specifically iOS simulator builds`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
const {
|
||||
privateProjectConfig: { projectId },
|
||||
loggedIn: { graphqlClient },
|
||||
@@ -116,7 +100,6 @@ export default class BuildList extends EasCommand {
|
||||
appIdentifier: flags.appIdentifier,
|
||||
buildProfile: flags.buildProfile,
|
||||
gitCommitHash: flags.gitCommitHash,
|
||||
simulator: flags.simulator,
|
||||
},
|
||||
paginatedQueryOptions,
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
PaginatedQueryOptions,
|
||||
getPaginatedQueryOptions,
|
||||
} from '../../commandUtils/pagination';
|
||||
import { AppPlatform, BuildFragment, BuildStatus } from '../../graphql/generated';
|
||||
import { AppPlatform, BuildFragment, BuildStatus, DistributionType } from '../../graphql/generated';
|
||||
import { BuildQuery } from '../../graphql/queries/BuildQuery';
|
||||
import Log from '../../log';
|
||||
import { appPlatformDisplayNames } from '../../platform';
|
||||
@@ -200,7 +200,8 @@ async function maybeGetBuildAsync(
|
||||
projectId: string,
|
||||
paginatedQueryOptions: PaginatedQueryOptions
|
||||
): Promise<BuildFragment | null> {
|
||||
const simulator = flags.selectedPlatform === AppPlatform.Ios ? true : undefined;
|
||||
const distributionType =
|
||||
flags.selectedPlatform === AppPlatform.Ios ? DistributionType.Simulator : undefined;
|
||||
|
||||
if (flags.runArchiveFlags.id) {
|
||||
const build = await BuildQuery.byIdAsync(graphqlClient, flags.runArchiveFlags.id);
|
||||
@@ -218,9 +219,9 @@ async function maybeGetBuildAsync(
|
||||
} build to run for ${await getDisplayNameForProjectIdAsync(graphqlClient, projectId)} app`,
|
||||
filter: {
|
||||
platform: flags.selectedPlatform,
|
||||
distribution: distributionType,
|
||||
status: BuildStatus.Finished,
|
||||
buildProfile: flags.profile,
|
||||
simulator,
|
||||
},
|
||||
paginatedQueryOptions,
|
||||
selectPromptDisabledFunction: build => !isRunnableOnSimulatorOrEmulator(build),
|
||||
@@ -234,9 +235,9 @@ async function maybeGetBuildAsync(
|
||||
projectId,
|
||||
filter: {
|
||||
platform: flags.selectedPlatform,
|
||||
distribution: distributionType,
|
||||
status: BuildStatus.Finished,
|
||||
buildProfile: flags.profile,
|
||||
simulator,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ export default class BuildVersionGetView extends EasCommand {
|
||||
buildProfile: profile,
|
||||
platform,
|
||||
vcsClient,
|
||||
nonInteractive: flags['non-interactive'],
|
||||
});
|
||||
const remoteVersions = await AppVersionQuery.latestVersionAsync(
|
||||
graphqlClient,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getRuntimeVersionNullableAsync } from '@expo/config-plugins/build/utils/Updates';
|
||||
import { getRuntimeVersionNullable } from '@expo/config-plugins/build/utils/Updates';
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { EasJsonAccessor, EasJsonUtils } from '@expo/eas-json';
|
||||
import { Flags } from '@oclif/core';
|
||||
@@ -77,7 +77,6 @@ export default class BuildVersionSetView extends EasCommand {
|
||||
buildProfile: profile,
|
||||
platform,
|
||||
vcsClient,
|
||||
nonInteractive: false,
|
||||
});
|
||||
const remoteVersions = await AppVersionQuery.latestVersionAsync(
|
||||
graphqlClient,
|
||||
@@ -117,8 +116,7 @@ export default class BuildVersionSetView extends EasCommand {
|
||||
applicationIdentifier,
|
||||
storeVersion: exp.version ?? '1.0.0',
|
||||
buildVersion: String(version),
|
||||
runtimeVersion:
|
||||
(await getRuntimeVersionNullableAsync(projectDir, exp, platform)) ?? undefined,
|
||||
runtimeVersion: getRuntimeVersionNullable(exp, platform) ?? undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@ export default class BuildVersionSyncView extends EasCommand {
|
||||
buildProfile: profileInfo.profile,
|
||||
platform: profileInfo.platform,
|
||||
vcsClient,
|
||||
nonInteractive: false,
|
||||
});
|
||||
const remoteVersions = await AppVersionQuery.latestVersionAsync(
|
||||
graphqlClient,
|
||||
|
||||
@@ -4,11 +4,7 @@ import { print } from 'graphql';
|
||||
import gql from 'graphql-tag';
|
||||
|
||||
import { selectBranchOnAppAsync } from '../../branch/queries';
|
||||
import {
|
||||
getAlwaysTrueBranchMapping,
|
||||
hasEmptyBranchMap,
|
||||
hasStandardBranchMap,
|
||||
} from '../../channel/branch-mapping';
|
||||
import { hasEmptyBranchMap, hasStandardBranchMap } from '../../channel/branch-mapping';
|
||||
import { selectChannelOnAppAsync } from '../../channel/queries';
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
@@ -128,7 +124,11 @@ export default class ChannelEdit extends EasCommand {
|
||||
|
||||
const channel = await updateChannelBranchMappingAsync(graphqlClient, {
|
||||
channelId: existingChannel.id,
|
||||
branchMapping: JSON.stringify(getAlwaysTrueBranchMapping(branch.id)),
|
||||
// todo: move branch mapping logic to utility
|
||||
branchMapping: JSON.stringify({
|
||||
data: [{ branchId: branch.id, branchMappingLogic: 'true' }],
|
||||
version: 0,
|
||||
}),
|
||||
});
|
||||
|
||||
if (json) {
|
||||
|
||||
@@ -125,7 +125,6 @@ export default class ChannelRollout extends EasCommand {
|
||||
|
||||
static override contextDefinition = {
|
||||
...this.ContextOptions.ProjectConfig,
|
||||
...this.ContextOptions.Vcs,
|
||||
...this.ContextOptions.LoggedIn,
|
||||
};
|
||||
|
||||
@@ -133,8 +132,7 @@ export default class ChannelRollout extends EasCommand {
|
||||
const { args, flags } = await this.parse(ChannelRollout);
|
||||
const argsAndFlags = this.sanitizeArgsAndFlags({ ...flags, ...args });
|
||||
const {
|
||||
privateProjectConfig: { exp, projectId, projectDir },
|
||||
vcsClient,
|
||||
privateProjectConfig: { exp, projectId },
|
||||
loggedIn: { graphqlClient },
|
||||
} = await this.getContextAsync(ChannelRollout, {
|
||||
nonInteractive: argsAndFlags.nonInteractive,
|
||||
@@ -143,12 +141,12 @@ export default class ChannelRollout extends EasCommand {
|
||||
enableJsonOutput();
|
||||
}
|
||||
|
||||
const app = { projectId, exp, projectDir };
|
||||
const app = { projectId, exp };
|
||||
const ctx = {
|
||||
projectId,
|
||||
nonInteractive: argsAndFlags.nonInteractive,
|
||||
graphqlClient,
|
||||
app,
|
||||
vcsClient,
|
||||
};
|
||||
if (argsAndFlags.nonInteractive) {
|
||||
await new NonInteractiveRollout(argsAndFlags).runAsync(ctx);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { Flags } from '@oclif/core';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { SelectPlatform } from '../../credentials/manager/SelectPlatform';
|
||||
import EasCommand from '../commandUtils/EasCommand';
|
||||
import { SelectPlatform } from '../credentials/manager/SelectPlatform';
|
||||
|
||||
export default class Credentials extends EasCommand {
|
||||
static override description = 'manage credentials';
|
||||
@@ -1,64 +0,0 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { Flags } from '@oclif/core';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { SelectBuildProfileFromEasJson } from '../../credentials/manager/SelectBuildProfileFromEasJson';
|
||||
import { SetUpBuildCredentialsCommandAction } from '../../credentials/manager/SetUpBuildCredentialsCommandAction';
|
||||
import { selectPlatformAsync } from '../../platform';
|
||||
|
||||
export default class InitializeBuildCredentials extends EasCommand {
|
||||
static override description = 'Set up credentials for building your project.';
|
||||
|
||||
static override flags = {
|
||||
platform: Flags.enum({
|
||||
char: 'p',
|
||||
options: [Platform.ANDROID, Platform.IOS],
|
||||
}),
|
||||
profile: Flags.string({
|
||||
char: 'e',
|
||||
description: 'The name of the build profile in eas.json.',
|
||||
helpValue: 'PROFILE_NAME',
|
||||
}),
|
||||
};
|
||||
|
||||
static override contextDefinition = {
|
||||
...this.ContextOptions.LoggedIn,
|
||||
...this.ContextOptions.ProjectConfig,
|
||||
...this.ContextOptions.DynamicProjectConfig,
|
||||
...this.ContextOptions.Analytics,
|
||||
...this.ContextOptions.Vcs,
|
||||
};
|
||||
|
||||
async runAsync(): Promise<void> {
|
||||
const { flags } = await this.parse(InitializeBuildCredentials);
|
||||
const {
|
||||
loggedIn: { actor, graphqlClient },
|
||||
privateProjectConfig,
|
||||
getDynamicPrivateProjectConfigAsync,
|
||||
analytics,
|
||||
vcsClient,
|
||||
} = await this.getContextAsync(InitializeBuildCredentials, {
|
||||
nonInteractive: false,
|
||||
});
|
||||
|
||||
const platform = await selectPlatformAsync(flags.platform);
|
||||
|
||||
const buildProfile =
|
||||
flags.profile ??
|
||||
(await new SelectBuildProfileFromEasJson(
|
||||
privateProjectConfig.projectDir,
|
||||
Platform.IOS
|
||||
).getProfileNameFromEasConfigAsync());
|
||||
|
||||
await new SetUpBuildCredentialsCommandAction(
|
||||
actor,
|
||||
graphqlClient,
|
||||
vcsClient,
|
||||
analytics,
|
||||
privateProjectConfig ?? null,
|
||||
getDynamicPrivateProjectConfigAsync,
|
||||
platform,
|
||||
buildProfile
|
||||
).runAsync();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ConfigError, getProjectConfigDescription } from '@expo/config';
|
||||
import { getProjectConfigDescription } from '@expo/config';
|
||||
import { ExpoConfig } from '@expo/config-types';
|
||||
import { Flags } from '@oclif/core';
|
||||
import chalk from 'chalk';
|
||||
@@ -60,19 +60,7 @@ export default class ProjectInit extends EasCommand {
|
||||
projectDir: string,
|
||||
modifications: Partial<ExpoConfig>
|
||||
): Promise<void> {
|
||||
let result;
|
||||
try {
|
||||
result = await createOrModifyExpoConfigAsync(projectDir, modifications);
|
||||
} catch (error) {
|
||||
if (error instanceof ConfigError && error.code === 'MODULE_NOT_FOUND') {
|
||||
Log.warn(
|
||||
'Cannot determine which native SDK version your project uses because the module `expo` is not installed.'
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
const result = await createOrModifyExpoConfigAsync(projectDir, modifications);
|
||||
switch (result.type) {
|
||||
case 'success':
|
||||
break;
|
||||
|
||||
@@ -33,7 +33,6 @@ interface RawCommandFlags {
|
||||
verbose: boolean;
|
||||
wait: boolean;
|
||||
'non-interactive': boolean;
|
||||
'verbose-fastlane': boolean;
|
||||
}
|
||||
|
||||
interface CommandFlags {
|
||||
@@ -43,7 +42,6 @@ interface CommandFlags {
|
||||
verbose: boolean;
|
||||
wait: boolean;
|
||||
nonInteractive: boolean;
|
||||
isVerboseFastlaneEnabled: boolean;
|
||||
}
|
||||
|
||||
export default class Submit extends EasCommand {
|
||||
@@ -85,10 +83,6 @@ export default class Submit extends EasCommand {
|
||||
default: true,
|
||||
allowNo: true,
|
||||
}),
|
||||
'verbose-fastlane': Flags.boolean({
|
||||
default: false,
|
||||
description: 'Enable verbose logging for the submission process',
|
||||
}),
|
||||
'non-interactive': Flags.boolean({
|
||||
default: false,
|
||||
description: 'Run command in non-interactive mode',
|
||||
@@ -138,7 +132,6 @@ export default class Submit extends EasCommand {
|
||||
profile: submissionProfile.profile,
|
||||
archiveFlags: flagsWithPlatform.archiveFlags,
|
||||
nonInteractive: flagsWithPlatform.nonInteractive,
|
||||
isVerboseFastlaneEnabled: flagsWithPlatform.isVerboseFastlaneEnabled,
|
||||
actor,
|
||||
graphqlClient,
|
||||
analytics,
|
||||
@@ -182,7 +175,6 @@ export default class Submit extends EasCommand {
|
||||
wait,
|
||||
profile,
|
||||
'non-interactive': nonInteractive,
|
||||
'verbose-fastlane': isVerboseFastlaneEnabled,
|
||||
...archiveFlags
|
||||
} = flags;
|
||||
|
||||
@@ -203,7 +195,6 @@ export default class Submit extends EasCommand {
|
||||
wait,
|
||||
profile,
|
||||
nonInteractive,
|
||||
isVerboseFastlaneEnabled,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { ExpoConfig } from '@expo/config';
|
||||
import { instance, mock } from 'ts-mockito';
|
||||
|
||||
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { ensureEASUpdateIsConfiguredAsync } from '../../../update/configure';
|
||||
import { Client } from '../../../vcs/vcs';
|
||||
|
||||
describe(ensureEASUpdateIsConfiguredAsync, () => {
|
||||
it('errors with "useClassicUpdates" set and no app.json', async () => {
|
||||
const graphqlClient = instance(mock<ExpoGraphqlClient>({}));
|
||||
const vcsClient = instance(mock<Client>({}));
|
||||
const exp: ExpoConfig = {
|
||||
name: 'test',
|
||||
slug: 'test',
|
||||
updates: { useClassicUpdates: true },
|
||||
};
|
||||
|
||||
await expect(async () => {
|
||||
await ensureEASUpdateIsConfiguredAsync(graphqlClient, {
|
||||
exp,
|
||||
projectId: 'test',
|
||||
projectDir: '/tmp/test',
|
||||
platform: null,
|
||||
vcsClient,
|
||||
});
|
||||
}).rejects.toThrow(
|
||||
`Your app config sets "updates.useClassicUpdates" but EAS Update does not support classic updates. Remove "useClassicUpdates" from your app config and run this command again.`
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
DynamicPublicProjectConfigContextField,
|
||||
} from '../../../commandUtils/context/DynamicProjectConfigContextField';
|
||||
import LoggedInContextField from '../../../commandUtils/context/LoggedInContextField';
|
||||
import VcsClientContextField from '../../../commandUtils/context/VcsClientContextField';
|
||||
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import FeatureGateEnvOverrides from '../../../commandUtils/gating/FeatureGateEnvOverrides';
|
||||
import FeatureGating from '../../../commandUtils/gating/FeatureGating';
|
||||
@@ -22,7 +21,6 @@ import { PublishMutation } from '../../../graphql/mutations/PublishMutation';
|
||||
import { AppQuery } from '../../../graphql/queries/AppQuery';
|
||||
import { collectAssetsAsync, uploadAssetsAsync } from '../../../project/publish';
|
||||
import { getBranchNameFromChannelNameAsync } from '../../../update/getBranchNameFromChannelNameAsync';
|
||||
import { resolveVcsClient } from '../../../vcs';
|
||||
|
||||
const projectRoot = '/test-project';
|
||||
const commandOptions = { root: projectRoot } as any;
|
||||
@@ -267,9 +265,6 @@ function mockTestProject({
|
||||
featureGating: new FeatureGating({}, new FeatureGateEnvOverrides()),
|
||||
graphqlClient,
|
||||
});
|
||||
jest
|
||||
.spyOn(VcsClientContextField.prototype, 'getValueAsync')
|
||||
.mockResolvedValue(resolveVcsClient());
|
||||
|
||||
jest.mocked(AppQuery.byIdAsync).mockResolvedValue({
|
||||
id: '1234',
|
||||
@@ -329,7 +324,7 @@ function mockTestExport({
|
||||
uniqueUploadedAssetPaths: [],
|
||||
});
|
||||
|
||||
jest.mocked(Updates.getRuntimeVersionAsync).mockResolvedValue(runtimeVersion);
|
||||
jest.mocked(Updates.getRuntimeVersion).mockReturnValue(runtimeVersion);
|
||||
|
||||
return { inputDir: exportDir, platforms, runtimeVersion };
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
DynamicPublicProjectConfigContextField,
|
||||
} from '../../../commandUtils/context/DynamicProjectConfigContextField';
|
||||
import LoggedInContextField from '../../../commandUtils/context/LoggedInContextField';
|
||||
import VcsClientContextField from '../../../commandUtils/context/VcsClientContextField';
|
||||
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import FeatureGateEnvOverrides from '../../../commandUtils/gating/FeatureGateEnvOverrides';
|
||||
import FeatureGating from '../../../commandUtils/gating/FeatureGating';
|
||||
@@ -20,7 +19,6 @@ import { UpdateFragment } from '../../../graphql/generated';
|
||||
import { PublishMutation } from '../../../graphql/mutations/PublishMutation';
|
||||
import { AppQuery } from '../../../graphql/queries/AppQuery';
|
||||
import { getBranchNameFromChannelNameAsync } from '../../../update/getBranchNameFromChannelNameAsync';
|
||||
import { resolveVcsClient } from '../../../vcs';
|
||||
import UpdateRollBackToEmbedded from '../roll-back-to-embedded';
|
||||
|
||||
const projectRoot = '/test-project';
|
||||
@@ -86,7 +84,7 @@ describe(UpdateRollBackToEmbedded.name, () => {
|
||||
mockTestProject();
|
||||
const platforms = ['android', 'ios'];
|
||||
const runtimeVersion = 'exposdk:47.0.0';
|
||||
jest.mocked(Updates.getRuntimeVersionAsync).mockResolvedValue(runtimeVersion);
|
||||
jest.mocked(Updates.getRuntimeVersion).mockReturnValue(runtimeVersion);
|
||||
|
||||
jest.mocked(ensureBranchExistsAsync).mockResolvedValue({
|
||||
branchId: 'branch123',
|
||||
@@ -108,7 +106,7 @@ describe(UpdateRollBackToEmbedded.name, () => {
|
||||
const { projectId } = mockTestProject();
|
||||
const platforms = ['android', 'ios'];
|
||||
const runtimeVersion = 'exposdk:47.0.0';
|
||||
jest.mocked(Updates.getRuntimeVersionAsync).mockResolvedValue(runtimeVersion);
|
||||
jest.mocked(Updates.getRuntimeVersion).mockReturnValue(runtimeVersion);
|
||||
|
||||
jest.mocked(getBranchNameFromChannelNameAsync).mockResolvedValue('branchFromChannel');
|
||||
jest.mocked(ensureBranchExistsAsync).mockResolvedValue({
|
||||
@@ -156,7 +154,7 @@ describe(UpdateRollBackToEmbedded.name, () => {
|
||||
|
||||
const platforms = ['ios'];
|
||||
const runtimeVersion = 'exposdk:47.0.0';
|
||||
jest.mocked(Updates.getRuntimeVersionAsync).mockResolvedValue(runtimeVersion);
|
||||
jest.mocked(Updates.getRuntimeVersion).mockReturnValue(runtimeVersion);
|
||||
|
||||
// Mock an existing branch, so we don't create a new one
|
||||
jest.mocked(ensureBranchExistsAsync).mockResolvedValue({
|
||||
@@ -252,9 +250,6 @@ function mockTestProject({
|
||||
featureGating: new FeatureGating({}, new FeatureGateEnvOverrides()),
|
||||
graphqlClient,
|
||||
});
|
||||
jest
|
||||
.spyOn(VcsClientContextField.prototype, 'getValueAsync')
|
||||
.mockResolvedValue(resolveVcsClient());
|
||||
|
||||
jest.mocked(AppQuery.byIdAsync).mockResolvedValue({
|
||||
id: '1234',
|
||||
|
||||
@@ -35,6 +35,7 @@ export default class UpdateConfigure extends EasCommand {
|
||||
const platform = flags.platform as RequestedPlatform;
|
||||
const {
|
||||
privateProjectConfig: { projectId, exp, projectDir },
|
||||
loggedIn: { graphqlClient },
|
||||
vcsClient,
|
||||
} = await this.getContextAsync(UpdateConfigure, {
|
||||
nonInteractive: flags['non-interactive'],
|
||||
@@ -46,7 +47,7 @@ export default class UpdateConfigure extends EasCommand {
|
||||
|
||||
await vcsClient.ensureRepoExistsAsync();
|
||||
|
||||
await ensureEASUpdateIsConfiguredAsync({
|
||||
await ensureEASUpdateIsConfiguredAsync(graphqlClient, {
|
||||
exp,
|
||||
projectId,
|
||||
projectDir,
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Platform as PublishPlatform } from '@expo/config';
|
||||
import { Workflow } from '@expo/eas-build-job';
|
||||
import { Errors, Flags } from '@oclif/core';
|
||||
import chalk from 'chalk';
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import { ensureBranchExistsAsync } from '../../branch/queries';
|
||||
import { ensureRepoIsCleanAsync } from '../../build/utils/repository';
|
||||
import { getUpdateGroupUrl } from '../../build/utils/url';
|
||||
import { ensureChannelExistsAsync } from '../../channel/queries';
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { EasNonInteractiveAndJsonFlags } from '../../commandUtils/flags';
|
||||
import { getPaginatedQueryOptions } from '../../commandUtils/pagination';
|
||||
@@ -30,6 +29,7 @@ import {
|
||||
collectAssetsAsync,
|
||||
defaultPublishPlatforms,
|
||||
filterExportedPlatformsByFlag,
|
||||
generateEasMetadataAsync,
|
||||
getBranchNameForCommandAsync,
|
||||
getRequestedPlatform,
|
||||
getRuntimeToPlatformMappingFromRuntimeVersions,
|
||||
@@ -40,7 +40,6 @@ import {
|
||||
resolveInputDirectoryAsync,
|
||||
uploadAssetsAsync,
|
||||
} from '../../project/publish';
|
||||
import { resolveWorkflowPerPlatformAsync } from '../../project/workflow';
|
||||
import { ensureEASUpdateIsConfiguredAsync } from '../../update/configure';
|
||||
import { getUpdateJsonInfosForUpdates } from '../../update/utils';
|
||||
import {
|
||||
@@ -57,6 +56,7 @@ import { maybeWarnAboutEasOutagesAsync } from '../../utils/statuspageService';
|
||||
|
||||
type RawUpdateFlags = {
|
||||
auto: boolean;
|
||||
dev: boolean;
|
||||
branch?: string;
|
||||
channel?: string;
|
||||
message?: string;
|
||||
@@ -75,6 +75,7 @@ type RawUpdateFlags = {
|
||||
|
||||
type UpdateFlags = {
|
||||
auto: boolean;
|
||||
dev: boolean;
|
||||
platform: ExpoCLIExportPlatformFlag;
|
||||
branchName?: string;
|
||||
channelName?: string;
|
||||
@@ -135,6 +136,10 @@ export default class UpdatePublish extends EasCommand {
|
||||
default: 'all',
|
||||
required: false,
|
||||
}),
|
||||
dev: Flags.boolean({
|
||||
description: 'Publish a development bundle',
|
||||
default: false,
|
||||
}),
|
||||
auto: Flags.boolean({
|
||||
description:
|
||||
'Use the current git branch and commit message for the EAS branch and update message',
|
||||
@@ -160,6 +165,7 @@ export default class UpdatePublish extends EasCommand {
|
||||
auto: autoFlag,
|
||||
platform: platformFlag,
|
||||
channelName: channelNameArg,
|
||||
dev,
|
||||
updateMessage: updateMessageArg,
|
||||
inputDir,
|
||||
skipBundler,
|
||||
@@ -183,9 +189,6 @@ export default class UpdatePublish extends EasCommand {
|
||||
enableJsonOutput();
|
||||
}
|
||||
|
||||
await vcsClient.ensureRepoExistsAsync();
|
||||
await ensureRepoIsCleanAsync(vcsClient, nonInteractive);
|
||||
|
||||
const {
|
||||
exp: expPossiblyWithoutEasUpdateConfigured,
|
||||
projectId,
|
||||
@@ -194,7 +197,7 @@ export default class UpdatePublish extends EasCommand {
|
||||
|
||||
await maybeWarnAboutEasOutagesAsync(graphqlClient, [StatuspageServiceName.EasUpdate]);
|
||||
|
||||
await ensureEASUpdateIsConfiguredAsync({
|
||||
await ensureEASUpdateIsConfiguredAsync(graphqlClient, {
|
||||
exp: expPossiblyWithoutEasUpdateConfigured,
|
||||
platform: getRequestedPlatform(platformFlag),
|
||||
projectDir,
|
||||
@@ -228,7 +231,7 @@ export default class UpdatePublish extends EasCommand {
|
||||
if (!skipBundler) {
|
||||
const bundleSpinner = ora().start('Exporting...');
|
||||
try {
|
||||
await buildBundlesAsync({ projectDir, inputDir, exp, platformFlag, clearCache });
|
||||
await buildBundlesAsync({ projectDir, inputDir, dev, exp, platformFlag, clearCache });
|
||||
bundleSpinner.succeed('Exported bundle(s)');
|
||||
} catch (e) {
|
||||
bundleSpinner.fail('Export failed');
|
||||
@@ -352,7 +355,7 @@ export default class UpdatePublish extends EasCommand {
|
||||
Log.withInfo(
|
||||
`${platformString} (maximum: ${assetLimitPerUpdateGroup} total per update). ${learnMore(
|
||||
'https://expo.fyi/eas-update-asset-limits',
|
||||
{ learnMoreMessage: 'Learn more about asset limits' }
|
||||
{ learnMoreMessage: 'Learn more about asset limits.' }
|
||||
)}`
|
||||
);
|
||||
} catch (e) {
|
||||
@@ -360,23 +363,29 @@ export default class UpdatePublish extends EasCommand {
|
||||
throw e;
|
||||
}
|
||||
|
||||
const workflows = await resolveWorkflowPerPlatformAsync(projectDir, vcsClient);
|
||||
const runtimeVersions = await getRuntimeVersionObjectAsync({
|
||||
const runtimeVersions = await getRuntimeVersionObjectAsync(
|
||||
exp,
|
||||
platforms: realizedPlatforms,
|
||||
realizedPlatforms,
|
||||
projectDir,
|
||||
workflows: {
|
||||
...workflows,
|
||||
web: Workflow.UNKNOWN,
|
||||
},
|
||||
});
|
||||
vcsClient
|
||||
);
|
||||
const runtimeToPlatformMapping =
|
||||
getRuntimeToPlatformMappingFromRuntimeVersions(runtimeVersions);
|
||||
|
||||
const { branchId } = await ensureBranchExistsAsync(graphqlClient, {
|
||||
const { branchId, createdBranch } = await ensureBranchExistsAsync(graphqlClient, {
|
||||
appId: projectId,
|
||||
branchName,
|
||||
});
|
||||
if (createdBranch) {
|
||||
await ensureChannelExistsAsync(graphqlClient, {
|
||||
appId: projectId,
|
||||
branchId,
|
||||
channelName: branchName,
|
||||
});
|
||||
Log.withTick(
|
||||
`Channel: ${chalk.bold(branchName)} pointed at branch: ${chalk.bold(branchName)}`
|
||||
);
|
||||
}
|
||||
|
||||
const gitCommitHash = await vcsClient.getCommitHashAsync();
|
||||
const isGitWorkingTreeDirty = await vcsClient.hasUncommittedChangesAsync();
|
||||
@@ -460,6 +469,9 @@ export default class UpdatePublish extends EasCommand {
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (!skipBundler) {
|
||||
await generateEasMetadataAsync(distRoot, getUpdateJsonInfosForUpdates(newUpdates));
|
||||
}
|
||||
if (jsonFlag) {
|
||||
printJsonOnlyOutput(getUpdateJsonInfosForUpdates(newUpdates));
|
||||
} else {
|
||||
@@ -535,7 +547,7 @@ export default class UpdatePublish extends EasCommand {
|
||||
private sanitizeFlags(flags: RawUpdateFlags): UpdateFlags {
|
||||
const nonInteractive = flags['non-interactive'] ?? false;
|
||||
|
||||
const { auto, branch: branchName, channel: channelName, message: updateMessage } = flags;
|
||||
const { auto, branch: branchName, channel: channelName, dev, message: updateMessage } = flags;
|
||||
if (nonInteractive && !auto && !(updateMessage && (branchName || channelName))) {
|
||||
Errors.error(
|
||||
'--branch and --message, or --channel and --message are required when updating in non-interactive mode unless --auto is specified',
|
||||
@@ -564,6 +576,7 @@ export default class UpdatePublish extends EasCommand {
|
||||
auto,
|
||||
branchName,
|
||||
channelName,
|
||||
dev,
|
||||
updateMessage,
|
||||
inputDir: flags['input-dir'],
|
||||
skipBundler: flags['skip-bundler'],
|
||||
|
||||
@@ -293,7 +293,12 @@ async function askUpdatesFromChannelNameAsync(
|
||||
nonInteractive,
|
||||
}: { projectId: string; channelName: string; json: boolean; nonInteractive: boolean }
|
||||
): Promise<UpdateToRepublish[]> {
|
||||
const branchName = await getBranchNameFromChannelNameAsync(graphqlClient, projectId, channelName);
|
||||
const branchName = await getBranchNameFromChannelNameAsync(
|
||||
graphqlClient,
|
||||
projectId,
|
||||
channelName,
|
||||
{ json, nonInteractive, offset: 0 }
|
||||
);
|
||||
|
||||
return await askUpdatesFromBranchNameAsync(graphqlClient, {
|
||||
projectId,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Platform as PublishPlatform } from '@expo/config';
|
||||
import { Workflow } from '@expo/eas-build-job';
|
||||
import { Errors, Flags } from '@oclif/core';
|
||||
import chalk from 'chalk';
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import { ensureBranchExistsAsync } from '../../branch/queries';
|
||||
import { getUpdateGroupUrl } from '../../build/utils/url';
|
||||
import { ensureChannelExistsAsync } from '../../channel/queries';
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { EasNonInteractiveAndJsonFlags } from '../../commandUtils/flags';
|
||||
@@ -32,7 +33,6 @@ import {
|
||||
getRuntimeVersionObjectAsync,
|
||||
getUpdateMessageForCommandAsync,
|
||||
} from '../../project/publish';
|
||||
import { resolveWorkflowPerPlatformAsync } from '../../project/workflow';
|
||||
import { ensureEASUpdateIsConfiguredAsync } from '../../update/configure';
|
||||
import { getUpdateJsonInfosForUpdates } from '../../update/utils';
|
||||
import {
|
||||
@@ -148,7 +148,7 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
||||
|
||||
await maybeWarnAboutEasOutagesAsync(graphqlClient, [StatuspageServiceName.EasUpdate]);
|
||||
|
||||
await ensureEASUpdateIsConfiguredAsync({
|
||||
await ensureEASUpdateIsConfiguredAsync(graphqlClient, {
|
||||
exp: expPossiblyWithoutEasUpdateConfigured,
|
||||
platform: getRequestedPlatform(platformFlag),
|
||||
projectDir,
|
||||
@@ -184,24 +184,29 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
||||
const realizedPlatforms: PublishPlatform[] =
|
||||
platformFlag === 'all' ? defaultPublishPlatforms : [platformFlag];
|
||||
|
||||
const { branchId } = await ensureBranchExistsAsync(graphqlClient, {
|
||||
const { branchId, createdBranch } = await ensureBranchExistsAsync(graphqlClient, {
|
||||
appId: projectId,
|
||||
branchName,
|
||||
});
|
||||
if (createdBranch) {
|
||||
await ensureChannelExistsAsync(graphqlClient, {
|
||||
appId: projectId,
|
||||
branchId,
|
||||
channelName: branchName,
|
||||
});
|
||||
}
|
||||
|
||||
Log.withTick(`Channel: ${chalk.bold(branchName)} pointed at branch: ${chalk.bold(branchName)}`);
|
||||
|
||||
const gitCommitHash = await vcsClient.getCommitHashAsync();
|
||||
const isGitWorkingTreeDirty = await vcsClient.hasUncommittedChangesAsync();
|
||||
|
||||
const workflows = await resolveWorkflowPerPlatformAsync(projectDir, vcsClient);
|
||||
const runtimeVersions = await getRuntimeVersionObjectAsync({
|
||||
const runtimeVersions = await getRuntimeVersionObjectAsync(
|
||||
exp,
|
||||
platforms: realizedPlatforms,
|
||||
realizedPlatforms,
|
||||
projectDir,
|
||||
workflows: {
|
||||
...workflows,
|
||||
web: Workflow.UNKNOWN,
|
||||
},
|
||||
});
|
||||
vcsClient
|
||||
);
|
||||
|
||||
let newUpdates: UpdatePublishMutation['updateBranch']['publishUpdateGroups'];
|
||||
const publishSpinner = ora('Publishing...').start();
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import Log from '../../../log';
|
||||
import { CredentialsContext } from '../../context';
|
||||
import { AppLookupParams } from '../api/GraphqlClient';
|
||||
|
||||
export class AssignGoogleServiceAccountKeyForSubmissions {
|
||||
export class AssignGoogleServiceAccountKey {
|
||||
constructor(private app: AppLookupParams) {}
|
||||
|
||||
public async runAsync(
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
import {
|
||||
CommonAndroidAppCredentialsFragment,
|
||||
GoogleServiceAccountKeyFragment,
|
||||
} from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { CredentialsContext } from '../../context';
|
||||
import { AppLookupParams } from '../api/GraphqlClient';
|
||||
|
||||
export class AssignGoogleServiceAccountKeyForFcmV1 {
|
||||
constructor(private app: AppLookupParams) {}
|
||||
|
||||
public async runAsync(
|
||||
ctx: CredentialsContext,
|
||||
googleServiceAccountKey: GoogleServiceAccountKeyFragment
|
||||
): Promise<CommonAndroidAppCredentialsFragment> {
|
||||
const appCredentials =
|
||||
await ctx.android.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(
|
||||
ctx.graphqlClient,
|
||||
this.app
|
||||
);
|
||||
const updatedAppCredentials = await ctx.android.updateAndroidAppCredentialsAsync(
|
||||
ctx.graphqlClient,
|
||||
appCredentials,
|
||||
{
|
||||
googleServiceAccountKeyForFcmV1Id: googleServiceAccountKey.id,
|
||||
}
|
||||
);
|
||||
Log.succeed(
|
||||
`Google Service Account Key assigned to ${this.app.androidApplicationIdentifier} for FCM V1`
|
||||
);
|
||||
return updatedAppCredentials;
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ export class CreateGoogleServiceAccountKey {
|
||||
|
||||
Log.log(
|
||||
`${chalk.bold(
|
||||
'A Google Service Account JSON key is required for uploading your app to Google Play Store, and for sending Android Notifications via FCM V1.'
|
||||
'A Google Service Account JSON key is required to upload your app to Google Play Store'
|
||||
)}.\n` +
|
||||
`If you're not sure what this is or how to create one, ${learnMore(
|
||||
'https://expo.fyi/creating-google-service-account',
|
||||
|
||||
+3
-6
@@ -1,6 +1,6 @@
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import { AssignGoogleServiceAccountKeyForSubmissions } from './AssignGoogleServiceAccountKeyForSubmissions';
|
||||
import { AssignGoogleServiceAccountKey } from './AssignGoogleServiceAccountKey';
|
||||
import { CreateGoogleServiceAccountKey } from './CreateGoogleServiceAccountKey';
|
||||
import { UseExistingGoogleServiceAccountKey } from './UseExistingGoogleServiceAccountKey';
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import { CredentialsContext } from '../../context';
|
||||
import { MissingCredentialsNonInteractiveError } from '../../errors';
|
||||
import { AppLookupParams } from '../api/GraphqlClient';
|
||||
|
||||
export class SetUpGoogleServiceAccountKeyForSubmissions {
|
||||
export class SetUpGoogleServiceAccountKey {
|
||||
constructor(private app: AppLookupParams) {}
|
||||
|
||||
public async runAsync(ctx: CredentialsContext): Promise<CommonAndroidAppCredentialsFragment> {
|
||||
@@ -46,10 +46,7 @@ export class SetUpGoogleServiceAccountKeyForSubmissions {
|
||||
} else {
|
||||
googleServiceAccountKey = await this.createOrUseExistingKeyAsync(ctx);
|
||||
}
|
||||
return await new AssignGoogleServiceAccountKeyForSubmissions(this.app).runAsync(
|
||||
ctx,
|
||||
googleServiceAccountKey
|
||||
);
|
||||
return await new AssignGoogleServiceAccountKey(this.app).runAsync(ctx, googleServiceAccountKey);
|
||||
}
|
||||
|
||||
private async isGoogleServiceAccountKeySetupAsync(ctx: CredentialsContext): Promise<boolean> {
|
||||
-87
@@ -1,87 +0,0 @@
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import { AssignGoogleServiceAccountKeyForFcmV1 } from './AssignGoogleServiceAccountKeyForFcmV1';
|
||||
import { CreateGoogleServiceAccountKey } from './CreateGoogleServiceAccountKey';
|
||||
import { UseExistingGoogleServiceAccountKey } from './UseExistingGoogleServiceAccountKey';
|
||||
import {
|
||||
CommonAndroidAppCredentialsFragment,
|
||||
GoogleServiceAccountKeyFragment,
|
||||
} from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { promptAsync } from '../../../prompts';
|
||||
import { CredentialsContext } from '../../context';
|
||||
import { MissingCredentialsNonInteractiveError } from '../../errors';
|
||||
import { AppLookupParams } from '../api/GraphqlClient';
|
||||
|
||||
export class SetUpGoogleServiceAccountKeyForFcmV1 {
|
||||
constructor(private app: AppLookupParams) {}
|
||||
|
||||
public async runAsync(ctx: CredentialsContext): Promise<CommonAndroidAppCredentialsFragment> {
|
||||
const isKeySetup = await this.isGoogleServiceAccountKeySetupAsync(ctx);
|
||||
if (isKeySetup) {
|
||||
Log.succeed('Google Service Account Key for FCM V1 already set up.');
|
||||
return nullthrows(
|
||||
await ctx.android.getAndroidAppCredentialsWithCommonFieldsAsync(
|
||||
ctx.graphqlClient,
|
||||
this.app
|
||||
),
|
||||
'androidAppCredentials cannot be null if google service account key is already set up'
|
||||
);
|
||||
}
|
||||
if (ctx.nonInteractive) {
|
||||
throw new MissingCredentialsNonInteractiveError(
|
||||
'Google Service Account Keys cannot be set up in --non-interactive mode.'
|
||||
);
|
||||
}
|
||||
|
||||
const keysForAccount = await ctx.android.getGoogleServiceAccountKeysForAccountAsync(
|
||||
ctx.graphqlClient,
|
||||
this.app.account
|
||||
);
|
||||
let googleServiceAccountKey = null;
|
||||
if (keysForAccount.length === 0) {
|
||||
googleServiceAccountKey = await new CreateGoogleServiceAccountKey(this.app.account).runAsync(
|
||||
ctx
|
||||
);
|
||||
} else {
|
||||
googleServiceAccountKey = await this.createOrUseExistingKeyAsync(ctx);
|
||||
}
|
||||
return await new AssignGoogleServiceAccountKeyForFcmV1(this.app).runAsync(
|
||||
ctx,
|
||||
googleServiceAccountKey
|
||||
);
|
||||
}
|
||||
|
||||
private async isGoogleServiceAccountKeySetupAsync(ctx: CredentialsContext): Promise<boolean> {
|
||||
const appCredentials = await ctx.android.getAndroidAppCredentialsWithCommonFieldsAsync(
|
||||
ctx.graphqlClient,
|
||||
this.app
|
||||
);
|
||||
return !!appCredentials?.googleServiceAccountKeyForFcmV1;
|
||||
}
|
||||
|
||||
private async createOrUseExistingKeyAsync(
|
||||
ctx: CredentialsContext
|
||||
): Promise<GoogleServiceAccountKeyFragment> {
|
||||
const { action } = await promptAsync({
|
||||
type: 'select',
|
||||
name: 'action',
|
||||
message: 'Select the Google Service Account Key to use for FCM V1:',
|
||||
choices: [
|
||||
{
|
||||
title: '[Choose an existing key]',
|
||||
value: 'CHOOSE_EXISTING',
|
||||
},
|
||||
{ title: '[Upload a new service account key]', value: 'GENERATE' },
|
||||
],
|
||||
});
|
||||
|
||||
if (action === 'GENERATE') {
|
||||
return await new CreateGoogleServiceAccountKey(this.app.account).runAsync(ctx);
|
||||
}
|
||||
return (
|
||||
(await new UseExistingGoogleServiceAccountKey(this.app.account).runAsync(ctx)) ??
|
||||
(await this.createOrUseExistingKeyAsync(ctx))
|
||||
);
|
||||
}
|
||||
}
|
||||
+4
-8
@@ -2,12 +2,12 @@ import { AppQuery } from '../../../../graphql/queries/AppQuery';
|
||||
import { testGoogleServiceAccountKeyFragment } from '../../../__tests__/fixtures-android';
|
||||
import { testAppQueryByIdResponse } from '../../../__tests__/fixtures-constants';
|
||||
import { createCtxMock } from '../../../__tests__/fixtures-context';
|
||||
import { AssignGoogleServiceAccountKeyForSubmissions } from '../AssignGoogleServiceAccountKeyForSubmissions';
|
||||
import { AssignGoogleServiceAccountKey } from '../AssignGoogleServiceAccountKey';
|
||||
import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils';
|
||||
|
||||
jest.mock('../../../../graphql/queries/AppQuery');
|
||||
|
||||
describe(AssignGoogleServiceAccountKeyForSubmissions, () => {
|
||||
describe(AssignGoogleServiceAccountKey, () => {
|
||||
beforeEach(() => {
|
||||
jest.mocked(AppQuery.byIdAsync).mockResolvedValue(testAppQueryByIdResponse);
|
||||
});
|
||||
@@ -16,9 +16,7 @@ describe(AssignGoogleServiceAccountKeyForSubmissions, () => {
|
||||
nonInteractive: false,
|
||||
});
|
||||
const appLookupParams = await getAppLookupParamsFromContextAsync(ctx);
|
||||
const assignGoogleServiceAccountKeyAction = new AssignGoogleServiceAccountKeyForSubmissions(
|
||||
appLookupParams
|
||||
);
|
||||
const assignGoogleServiceAccountKeyAction = new AssignGoogleServiceAccountKey(appLookupParams);
|
||||
await assignGoogleServiceAccountKeyAction.runAsync(ctx, testGoogleServiceAccountKeyFragment);
|
||||
|
||||
// expect app credentials to be fetched/created, then updated
|
||||
@@ -32,9 +30,7 @@ describe(AssignGoogleServiceAccountKeyForSubmissions, () => {
|
||||
nonInteractive: true,
|
||||
});
|
||||
const appLookupParams = await getAppLookupParamsFromContextAsync(ctx);
|
||||
const assignGoogleServiceAccountKeyAction = new AssignGoogleServiceAccountKeyForSubmissions(
|
||||
appLookupParams
|
||||
);
|
||||
const assignGoogleServiceAccountKeyAction = new AssignGoogleServiceAccountKey(appLookupParams);
|
||||
|
||||
// dont fail if users are running in non-interactive mode
|
||||
await expect(
|
||||
+5
-11
@@ -11,7 +11,7 @@ import { testAppQueryByIdResponse } from '../../../__tests__/fixtures-constants'
|
||||
import { createCtxMock } from '../../../__tests__/fixtures-context';
|
||||
import { MissingCredentialsNonInteractiveError } from '../../../errors';
|
||||
import { getAppLookupParamsFromContextAsync } from '../BuildCredentialsUtils';
|
||||
import { SetUpGoogleServiceAccountKeyForSubmissions } from '../SetUpGoogleServiceAccountKeyForSubmissions';
|
||||
import { SetUpGoogleServiceAccountKey } from '../SetUpGoogleServiceAccountKey';
|
||||
|
||||
jest.mock('../../../../prompts');
|
||||
jest.mock('fs');
|
||||
@@ -24,7 +24,7 @@ beforeEach(() => {
|
||||
vol.reset();
|
||||
});
|
||||
|
||||
describe(SetUpGoogleServiceAccountKeyForSubmissions, () => {
|
||||
describe(SetUpGoogleServiceAccountKey, () => {
|
||||
beforeEach(() => {
|
||||
jest.mocked(AppQuery.byIdAsync).mockResolvedValue(testAppQueryByIdResponse);
|
||||
});
|
||||
@@ -39,9 +39,7 @@ describe(SetUpGoogleServiceAccountKeyForSubmissions, () => {
|
||||
},
|
||||
});
|
||||
const appLookupParams = await getAppLookupParamsFromContextAsync(ctx);
|
||||
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKeyForSubmissions(
|
||||
appLookupParams
|
||||
);
|
||||
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKey(appLookupParams);
|
||||
await setupGoogleServiceAccountKeyAction.runAsync(ctx);
|
||||
|
||||
expect(ctx.android.createGoogleServiceAccountKeyAsync).not.toHaveBeenCalled();
|
||||
@@ -64,9 +62,7 @@ describe(SetUpGoogleServiceAccountKeyForSubmissions, () => {
|
||||
},
|
||||
});
|
||||
const appLookupParams = await getAppLookupParamsFromContextAsync(ctx);
|
||||
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKeyForSubmissions(
|
||||
appLookupParams
|
||||
);
|
||||
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKey(appLookupParams);
|
||||
await setupGoogleServiceAccountKeyAction.runAsync(ctx);
|
||||
|
||||
expect(ctx.android.createGoogleServiceAccountKeyAsync).toHaveBeenCalledTimes(1);
|
||||
@@ -77,9 +73,7 @@ describe(SetUpGoogleServiceAccountKeyForSubmissions, () => {
|
||||
nonInteractive: true,
|
||||
});
|
||||
const appLookupParams = await getAppLookupParamsFromContextAsync(ctx);
|
||||
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKeyForSubmissions(
|
||||
appLookupParams
|
||||
);
|
||||
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKey(appLookupParams);
|
||||
await expect(setupGoogleServiceAccountKeyAction.runAsync(ctx)).rejects.toThrowError(
|
||||
MissingCredentialsNonInteractiveError
|
||||
);
|
||||
|
||||
@@ -106,11 +106,9 @@ export async function updateAndroidAppCredentialsAsync(
|
||||
{
|
||||
androidFcmId,
|
||||
googleServiceAccountKeyForSubmissionsId,
|
||||
googleServiceAccountKeyForFcmV1Id,
|
||||
}: {
|
||||
androidFcmId?: string;
|
||||
googleServiceAccountKeyForSubmissionsId?: string;
|
||||
googleServiceAccountKeyForFcmV1Id?: string;
|
||||
}
|
||||
): Promise<CommonAndroidAppCredentialsFragment> {
|
||||
let updatedAppCredentials = appCredentials;
|
||||
@@ -129,14 +127,6 @@ export async function updateAndroidAppCredentialsAsync(
|
||||
googleServiceAccountKeyForSubmissionsId
|
||||
);
|
||||
}
|
||||
if (googleServiceAccountKeyForFcmV1Id) {
|
||||
updatedAppCredentials =
|
||||
await AndroidAppCredentialsMutation.setGoogleServiceAccountKeyForFcmV1Async(
|
||||
graphqlClient,
|
||||
appCredentials.id,
|
||||
googleServiceAccountKeyForFcmV1Id
|
||||
);
|
||||
}
|
||||
return updatedAppCredentials;
|
||||
}
|
||||
|
||||
|
||||
-39
@@ -8,7 +8,6 @@ import {
|
||||
CommonAndroidAppCredentialsFragment,
|
||||
CreateAndroidAppCredentialsMutation,
|
||||
SetFcmMutation,
|
||||
SetGoogleServiceAccountKeyForFcmV1Mutation,
|
||||
SetGoogleServiceAccountKeyForSubmissionsMutation,
|
||||
} from '../../../../../graphql/generated';
|
||||
import { CommonAndroidAppCredentialsFragmentNode } from '../../../../../graphql/types/credentials/AndroidAppCredentials';
|
||||
@@ -125,42 +124,4 @@ export const AndroidAppCredentialsMutation = {
|
||||
);
|
||||
return data.androidAppCredentials.setGoogleServiceAccountKeyForSubmissions;
|
||||
},
|
||||
async setGoogleServiceAccountKeyForFcmV1Async(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
androidAppCredentialsId: string,
|
||||
googleServiceAccountKeyId: string
|
||||
): Promise<CommonAndroidAppCredentialsFragment> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.mutation<SetGoogleServiceAccountKeyForFcmV1Mutation>(
|
||||
gql`
|
||||
mutation SetGoogleServiceAccountKeyForFcmV1Mutation(
|
||||
$androidAppCredentialsId: ID!
|
||||
$googleServiceAccountKeyId: ID!
|
||||
) {
|
||||
androidAppCredentials {
|
||||
setGoogleServiceAccountKeyForFcmV1(
|
||||
id: $androidAppCredentialsId
|
||||
googleServiceAccountKeyId: $googleServiceAccountKeyId
|
||||
) {
|
||||
id
|
||||
...CommonAndroidAppCredentialsFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
${print(CommonAndroidAppCredentialsFragmentNode)}
|
||||
`,
|
||||
{
|
||||
androidAppCredentialsId,
|
||||
googleServiceAccountKeyId,
|
||||
}
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
assert(
|
||||
data.androidAppCredentials.setGoogleServiceAccountKeyForFcmV1,
|
||||
'GraphQL: `setGoogleServiceAccountKeyForFcmV1` not defined in server response'
|
||||
);
|
||||
return data.androidAppCredentials.setGoogleServiceAccountKeyForFcmV1;
|
||||
},
|
||||
};
|
||||
+7
-60
@@ -4,76 +4,27 @@ import gql from 'graphql-tag';
|
||||
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { withErrorHandlingAsync } from '../../../../../graphql/client';
|
||||
import {
|
||||
GoogleServiceAccountKeyByAccountQuery,
|
||||
GoogleServiceAccountKeyFragment,
|
||||
GoogleServiceAccountKeysPaginatedByAccountQuery,
|
||||
} from '../../../../../graphql/generated';
|
||||
import { GoogleServiceAccountKeyFragmentNode } from '../../../../../graphql/types/credentials/GoogleServiceAccountKey';
|
||||
import { Connection, QueryParams, fetchEntireDatasetAsync } from '../../../../../utils/relay';
|
||||
|
||||
export const GoogleServiceAccountKeyQuery = {
|
||||
async getAllForAccountAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string
|
||||
): Promise<GoogleServiceAccountKeyFragment[]> {
|
||||
const paginatedGetterAsync = async (
|
||||
relayArgs: QueryParams
|
||||
): Promise<Connection<GoogleServiceAccountKeyFragment>> => {
|
||||
return await GoogleServiceAccountKeyQuery.getAllForAccountPaginatedAsync(
|
||||
graphqlClient,
|
||||
accountName,
|
||||
relayArgs
|
||||
);
|
||||
};
|
||||
return await fetchEntireDatasetAsync({
|
||||
paginatedGetterAsync,
|
||||
progressBarLabel: 'fetching Google Service Account Keys...',
|
||||
});
|
||||
},
|
||||
async getAllForAccountPaginatedAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
{
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
}: { after?: string; first?: number; before?: string; last?: number }
|
||||
): Promise<
|
||||
GoogleServiceAccountKeysPaginatedByAccountQuery['account']['byName']['googleServiceAccountKeysPaginated']
|
||||
> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<GoogleServiceAccountKeysPaginatedByAccountQuery>(
|
||||
.query<GoogleServiceAccountKeyByAccountQuery>(
|
||||
gql`
|
||||
query GoogleServiceAccountKeysPaginatedByAccountQuery(
|
||||
$accountName: String!
|
||||
$after: String
|
||||
$first: Int
|
||||
$before: String
|
||||
$last: Int
|
||||
) {
|
||||
query GoogleServiceAccountKeyByAccountQuery($accountName: String!) {
|
||||
account {
|
||||
byName(accountName: $accountName) {
|
||||
id
|
||||
googleServiceAccountKeysPaginated(
|
||||
after: $after
|
||||
first: $first
|
||||
before: $before
|
||||
last: $last
|
||||
) {
|
||||
edges {
|
||||
cursor
|
||||
node {
|
||||
id
|
||||
...GoogleServiceAccountKeyFragment
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
googleServiceAccountKeys {
|
||||
id
|
||||
...GoogleServiceAccountKeyFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,10 +33,6 @@ export const GoogleServiceAccountKeyQuery = {
|
||||
`,
|
||||
{
|
||||
accountName,
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
},
|
||||
{
|
||||
additionalTypenames: ['GoogleServiceAccountKey'],
|
||||
@@ -93,6 +40,6 @@ export const GoogleServiceAccountKeyQuery = {
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
return data.account.byName.googleServiceAccountKeysPaginated;
|
||||
return data.account.byName.googleServiceAccountKeys;
|
||||
},
|
||||
};
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
exports[`print credentials prints the AndroidAppCredentials fragment 1`] = `
|
||||
"Android Credentials
|
||||
Project testApp
|
||||
Application Identifier test.com.appPush Notifications (FCM Legacy) Key abcd...efgh
|
||||
Updated 0 second agoPush Notifications (FCM V1): Google Service Account Key For FCM V1 None assigned yetSubmissions: Google Service Account Key for Play Store Submissions Project ID sdf.sdf.sdf
|
||||
Application Identifier test.com.appPush Notifications (FCM) Key abcd...efgh
|
||||
Updated 0 second agoGoogle Service Account Key For Submissions Project ID sdf.sdf.sdf
|
||||
Client Email [email protected]
|
||||
Client ID test-client-identifier
|
||||
Private Key ID test-private-key-identifier
|
||||
|
||||
@@ -13,11 +13,7 @@ import { getAppLookupParamsFromContextAsync } from '../../actions/BuildCredentia
|
||||
import { displayAndroidAppCredentials } from '../printCredentials';
|
||||
|
||||
jest.mock('../../../../log');
|
||||
jest.mock('chalk', () => ({
|
||||
bold: jest.fn(log => log),
|
||||
cyan: { bold: jest.fn(log => log) },
|
||||
dim: jest.fn(log => log),
|
||||
}));
|
||||
jest.mock('chalk', () => ({ bold: jest.fn(log => log), cyan: { bold: jest.fn(log => log) } }));
|
||||
jest.mock('../../../../graphql/queries/AppQuery');
|
||||
|
||||
mockdate.set(testLegacyAndroidFcmFragment.updatedAt);
|
||||
|
||||
@@ -96,7 +96,7 @@ export async function detectGoogleServiceAccountKeyPathAsync(
|
||||
): Promise<string | null> {
|
||||
const foundFilePaths = await glob('**/*.json', {
|
||||
cwd: projectDir,
|
||||
ignore: ['app.json', 'package*.json', 'tsconfig.json', 'node_modules', 'google-services.json'],
|
||||
ignore: ['app.json', 'package*.json', 'tsconfig.json', 'node_modules'],
|
||||
});
|
||||
|
||||
const googleServiceFiles = foundFilePaths
|
||||
|
||||
@@ -29,7 +29,7 @@ export function displayEmptyAndroidCredentials(appLookupParams: AppLookupParams)
|
||||
function displayAndroidFcmCredentials(appCredentials: CommonAndroidAppCredentialsFragment): void {
|
||||
const maybeFcm = appCredentials.androidFcm;
|
||||
Log.log(
|
||||
formatFields([{ label: 'Push Notifications (FCM Legacy)', value: '' }], {
|
||||
formatFields([{ label: 'Push Notifications (FCM)', value: '' }], {
|
||||
labelFormat: chalk.cyan.bold,
|
||||
})
|
||||
);
|
||||
@@ -60,43 +60,9 @@ function displayGoogleServiceAccountKeyForSubmissions(
|
||||
): void {
|
||||
const maybeGsaKey = appCredentials.googleServiceAccountKeyForSubmissions;
|
||||
Log.log(
|
||||
formatFields(
|
||||
[{ label: 'Submissions: Google Service Account Key for Play Store Submissions', value: '' }],
|
||||
{
|
||||
labelFormat: chalk.cyan.bold,
|
||||
}
|
||||
)
|
||||
);
|
||||
if (!maybeGsaKey) {
|
||||
Log.log(formatFields([{ label: '', value: 'None assigned yet' }]));
|
||||
Log.newLine();
|
||||
return;
|
||||
}
|
||||
const { projectIdentifier, privateKeyIdentifier, clientEmail, clientIdentifier, updatedAt } =
|
||||
maybeGsaKey;
|
||||
|
||||
const fields = [
|
||||
{ label: 'Project ID', value: projectIdentifier },
|
||||
{ label: 'Client Email', value: clientEmail },
|
||||
{ label: 'Client ID', value: clientIdentifier },
|
||||
{ label: 'Private Key ID', value: privateKeyIdentifier },
|
||||
{ label: 'Updated', value: `${fromNow(new Date(updatedAt))} ago` },
|
||||
];
|
||||
Log.log(formatFields(fields, { labelFormat: chalk.cyan.bold }));
|
||||
Log.newLine();
|
||||
}
|
||||
|
||||
function displayGoogleServiceAccountKeyForFcmV1(
|
||||
appCredentials: CommonAndroidAppCredentialsFragment
|
||||
): void {
|
||||
const maybeGsaKey = appCredentials.googleServiceAccountKeyForFcmV1;
|
||||
Log.log(
|
||||
formatFields(
|
||||
[{ label: 'Push Notifications (FCM V1): Google Service Account Key For FCM V1', value: '' }],
|
||||
{
|
||||
labelFormat: chalk.cyan.bold,
|
||||
}
|
||||
)
|
||||
formatFields([{ label: 'Google Service Account Key For Submissions', value: '' }], {
|
||||
labelFormat: chalk.cyan.bold,
|
||||
})
|
||||
);
|
||||
if (!maybeGsaKey) {
|
||||
Log.log(formatFields([{ label: '', value: 'None assigned yet' }]));
|
||||
@@ -121,7 +87,6 @@ function displayEASAndroidAppCredentials(
|
||||
appCredentials: CommonAndroidAppCredentialsFragment
|
||||
): void {
|
||||
displayAndroidFcmCredentials(appCredentials);
|
||||
displayGoogleServiceAccountKeyForFcmV1(appCredentials);
|
||||
displayGoogleServiceAccountKeyForSubmissions(appCredentials);
|
||||
const sortedBuildCredentialsList = sortBuildCredentials(
|
||||
appCredentials.androidAppBuildCredentialsList
|
||||
|
||||
@@ -14,7 +14,6 @@ import { isAdHocProfile, isEnterpriseUniversalProfile } from './utils/provisioni
|
||||
import { CommonIosAppCredentialsFragment } from '../../graphql/generated';
|
||||
import Log from '../../log';
|
||||
import { findApplicationTarget } from '../../project/ios/target';
|
||||
import { isExpoNotificationsInstalled } from '../../project/projectUtils';
|
||||
import { selectAsync } from '../../prompts';
|
||||
import { CredentialsContext } from '../context';
|
||||
import * as credentialsJsonReader from '../credentialsJson/read';
|
||||
@@ -106,11 +105,6 @@ export default class IosCredentialsProvider {
|
||||
|
||||
if (ctx.easJsonCliConfig?.promptToConfigurePushNotifications === false) {
|
||||
return null;
|
||||
} else if (
|
||||
ctx.easJsonCliConfig?.promptToConfigurePushNotifications === undefined &&
|
||||
!(await isExpoNotificationsInstalled(ctx.projectDir))
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const setupOption = await selectAsync(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { AppStoreApiKeyPurpose, provideOrGenerateAscApiKeyAsync } from './AscApiKeyUtils';
|
||||
import { AccountFragment, AppStoreConnectApiKeyFragment } from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { CredentialsContext } from '../../context';
|
||||
|
||||
export class CreateAscApiKey {
|
||||
@@ -14,6 +15,8 @@ export class CreateAscApiKey {
|
||||
}
|
||||
|
||||
const ascApiKey = await provideOrGenerateAscApiKeyAsync(ctx, purpose);
|
||||
return await ctx.ios.createAscApiKeyAsync(ctx.graphqlClient, this.account, ascApiKey);
|
||||
const result = await ctx.ios.createAscApiKeyAsync(ctx.graphqlClient, this.account, ascApiKey);
|
||||
Log.succeed('Created App Store Connect API Key');
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -48,13 +48,8 @@ export function formatDistributionCertificate(
|
||||
buildCredentials => buildCredentials.iosAppCredentials.app
|
||||
);
|
||||
if (apps.length) {
|
||||
// iosAppBuildCredentialsList is capped at 20 on www
|
||||
const appFullNames = apps
|
||||
.map(app => app.fullName)
|
||||
.slice(0, 19)
|
||||
.join(',');
|
||||
const andMaybeMore = apps.length > 19 ? ' (and more)' : '';
|
||||
line += chalk.gray(`\n 📲 Used by: ${appFullNames}${andMaybeMore}`);
|
||||
const appFullNames = apps.map(app => app.fullName).join(',');
|
||||
line += chalk.gray(`\n 📲 Used by: ${appFullNames}`);
|
||||
}
|
||||
|
||||
if (validSerialNumbers?.includes(serialNumber)) {
|
||||
@@ -259,10 +254,6 @@ function formatDistributionCertificateFromApple(
|
||||
const { name, status, id, expires, created, ownerName, serialNumber } = appleInfo;
|
||||
const expiresDate = new Date(expires * 1000).toDateString();
|
||||
const createdDate = new Date(created * 1000).toDateString();
|
||||
return [
|
||||
`🍏 ${chalk.bold(name)} (${status})`,
|
||||
`${chalk.bold('ID:')} ${id} ${chalk.bold('Serial Number:')} ${serialNumber}`,
|
||||
`${chalk.bold('Apple Team:')} ${appleInfo.ownerId} (${ownerName})`,
|
||||
`${chalk.bold('Expires:')} ${expiresDate} ${chalk.bold('Created:')} ${createdDate}`,
|
||||
].join('\n\t');
|
||||
return `${name} (${status}) - Cert ID: ${id}, Serial number: ${serialNumber}, Team ID: ${appleInfo.ownerId}, Team name: ${ownerName}
|
||||
expires: ${expiresDate}, created: ${createdDate}`;
|
||||
}
|
||||
@@ -185,13 +185,8 @@ export function formatPushKey(
|
||||
|
||||
const apps = pushKey.iosAppCredentialsList.map(appCredentials => appCredentials.app);
|
||||
if (apps.length) {
|
||||
// iosAppCredentialsList is capped at 20 on www
|
||||
const appFullNames = apps
|
||||
.map(app => app.fullName)
|
||||
.slice(0, 19)
|
||||
.join(',');
|
||||
const andMaybeMore = apps.length > 19 ? ' (and more)' : '';
|
||||
line += chalk.gray(`\n 📲 Used by: ${appFullNames}${andMaybeMore}`);
|
||||
const appFullNames = apps.map(app => app.fullName).join(',');
|
||||
line += chalk.gray(`\n 📲 Used by: ${appFullNames}`);
|
||||
}
|
||||
|
||||
if (validPushKeyIdentifiers?.includes(keyIdentifier)) {
|
||||
|
||||
@@ -34,20 +34,14 @@ export class RemoveDistributionCertificate {
|
||||
buildCredentials => buildCredentials.iosAppCredentials.app
|
||||
);
|
||||
if (apps.length !== 0) {
|
||||
// iosAppBuildCredentialsList is capped at 20 on www
|
||||
const appFullNames = apps
|
||||
.map(app => app.fullName)
|
||||
.slice(0, 19)
|
||||
.join(',');
|
||||
const andMaybeMore = apps.length > 19 ? ' (and more)' : '';
|
||||
|
||||
const appFullNames = apps.map(app => app.fullName).join(',');
|
||||
if (ctx.nonInteractive) {
|
||||
throw new Error(
|
||||
`Certificate is currently used by ${appFullNames}${andMaybeMore} and cannot be deleted in non-interactive mode.`
|
||||
`Certificate is currently used by ${appFullNames} and cannot be deleted in non-interactive mode.`
|
||||
);
|
||||
}
|
||||
const confirm = await confirmAsync({
|
||||
message: `You are removing certificate used by ${appFullNames}${andMaybeMore}. Do you want to continue?`,
|
||||
message: `You are removing certificate used by ${appFullNames}. Do you want to continue?`,
|
||||
});
|
||||
if (!confirm) {
|
||||
Log.log('Aborting');
|
||||
|
||||
@@ -27,14 +27,9 @@ export class RemovePushKey {
|
||||
|
||||
const apps = this.pushKey.iosAppCredentialsList.map(appCredentials => appCredentials.app);
|
||||
if (apps.length !== 0) {
|
||||
// iosAppCredentialsList is capped at 20 on www
|
||||
const appFullNames = apps
|
||||
.map(app => app.fullName)
|
||||
.slice(0, 19)
|
||||
.join(',');
|
||||
const andMaybeMore = apps.length > 19 ? ' (and more)' : '';
|
||||
const appFullNames = apps.map(app => app.fullName).join(',');
|
||||
const confirm = await confirmAsync({
|
||||
message: `Removing this push key will disable push notifications for ${appFullNames}${andMaybeMore}. Do you want to continue?`,
|
||||
message: `Removing this push key will disable push notifications for ${appFullNames}. Do you want to continue?`,
|
||||
});
|
||||
if (!confirm) {
|
||||
Log.log('Aborting');
|
||||
|
||||
@@ -326,7 +326,7 @@ export async function getDevicesForAppleTeamAsync(
|
||||
): Promise<AppleDeviceFragment[]> {
|
||||
return await AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(
|
||||
graphqlClient,
|
||||
account.name,
|
||||
account.id,
|
||||
appleTeamIdentifier,
|
||||
{
|
||||
useCache,
|
||||
|
||||
+7
-60
@@ -4,76 +4,27 @@ import gql from 'graphql-tag';
|
||||
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { withErrorHandlingAsync } from '../../../../../graphql/client';
|
||||
import {
|
||||
AppStoreConnectApiKeyByAccountQuery,
|
||||
AppStoreConnectApiKeyFragment,
|
||||
AppStoreConnectApiKeysPaginatedByAccountQuery,
|
||||
} from '../../../../../graphql/generated';
|
||||
import { AppStoreConnectApiKeyFragmentNode } from '../../../../../graphql/types/credentials/AppStoreConnectApiKey';
|
||||
import { Connection, QueryParams, fetchEntireDatasetAsync } from '../../../../../utils/relay';
|
||||
|
||||
export const AppStoreConnectApiKeyQuery = {
|
||||
async getAllForAccountAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string
|
||||
): Promise<AppStoreConnectApiKeyFragment[]> {
|
||||
const paginatedGetterAsync = async (
|
||||
relayArgs: QueryParams
|
||||
): Promise<Connection<AppStoreConnectApiKeyFragment>> => {
|
||||
return await AppStoreConnectApiKeyQuery.getAllForAccountPaginatedAsync(
|
||||
graphqlClient,
|
||||
accountName,
|
||||
relayArgs
|
||||
);
|
||||
};
|
||||
return await fetchEntireDatasetAsync({
|
||||
paginatedGetterAsync,
|
||||
progressBarLabel: 'fetching ASC Keys...',
|
||||
});
|
||||
},
|
||||
async getAllForAccountPaginatedAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
{
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
}: { after?: string; first?: number; before?: string; last?: number }
|
||||
): Promise<
|
||||
AppStoreConnectApiKeysPaginatedByAccountQuery['account']['byName']['appStoreConnectApiKeysPaginated']
|
||||
> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<AppStoreConnectApiKeysPaginatedByAccountQuery>(
|
||||
.query<AppStoreConnectApiKeyByAccountQuery>(
|
||||
gql`
|
||||
query AppStoreConnectApiKeysPaginatedByAccountQuery(
|
||||
$accountName: String!
|
||||
$after: String
|
||||
$first: Int
|
||||
$before: String
|
||||
$last: Int
|
||||
) {
|
||||
query AppStoreConnectApiKeyByAccountQuery($accountName: String!) {
|
||||
account {
|
||||
byName(accountName: $accountName) {
|
||||
id
|
||||
appStoreConnectApiKeysPaginated(
|
||||
after: $after
|
||||
first: $first
|
||||
before: $before
|
||||
last: $last
|
||||
) {
|
||||
edges {
|
||||
cursor
|
||||
node {
|
||||
id
|
||||
...AppStoreConnectApiKeyFragment
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
appStoreConnectApiKeys {
|
||||
id
|
||||
...AppStoreConnectApiKeyFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,10 +33,6 @@ export const AppStoreConnectApiKeyQuery = {
|
||||
`,
|
||||
{
|
||||
accountName,
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
},
|
||||
{
|
||||
additionalTypenames: ['AppStoreConnectApiKey'],
|
||||
@@ -93,6 +40,6 @@ export const AppStoreConnectApiKeyQuery = {
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
return data.account.byName.appStoreConnectApiKeysPaginated;
|
||||
return data.account.byName.appStoreConnectApiKeys;
|
||||
},
|
||||
};
|
||||
@@ -1,3 +1,4 @@
|
||||
import assert from 'assert';
|
||||
import { print } from 'graphql';
|
||||
import gql from 'graphql-tag';
|
||||
|
||||
@@ -6,16 +7,15 @@ import { DeviceNotFoundError } from '../../../../../devices/utils/errors';
|
||||
import { withErrorHandlingAsync } from '../../../../../graphql/client';
|
||||
import {
|
||||
AppleDevice,
|
||||
AppleDeviceFilterInput,
|
||||
AppleDeviceFragment,
|
||||
AppleDevicesByAppleTeamQuery,
|
||||
AppleDevicesByIdentifierQuery,
|
||||
AppleDevicesByTeamIdentifierQuery,
|
||||
AppleDevicesByTeamIdentifierQueryVariables,
|
||||
AppleDevicesPaginatedByAccountQuery,
|
||||
AppleTeamFragment,
|
||||
} from '../../../../../graphql/generated';
|
||||
import { AppleDeviceFragmentNode } from '../../../../../graphql/types/credentials/AppleDevice';
|
||||
import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam';
|
||||
import { Connection, QueryParams, fetchEntireDatasetAsync } from '../../../../../utils/relay';
|
||||
import { formatAppleTeam } from '../../../actions/AppleTeamFormatting';
|
||||
|
||||
export type AppleDeviceFragmentWithAppleTeam = AppleDeviceFragment & {
|
||||
@@ -38,25 +38,51 @@ export type AppleDevicesByIdentifierQueryResult = AppleDeviceQueryResult & {
|
||||
export const AppleDeviceQuery = {
|
||||
async getAllByAppleTeamIdentifierAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
accountId: string,
|
||||
appleTeamIdentifier: string,
|
||||
{ useCache = true }: { useCache?: boolean } = {}
|
||||
): Promise<AppleDeviceFragmentWithAppleTeam[]> {
|
||||
const paginatedGetterAsync = async (
|
||||
relayArgs: QueryParams
|
||||
): Promise<Connection<AppleDeviceFragmentWithAppleTeam>> => {
|
||||
return await AppleDeviceQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, {
|
||||
...relayArgs,
|
||||
filter: {
|
||||
appleTeamIdentifier,
|
||||
},
|
||||
useCache,
|
||||
});
|
||||
};
|
||||
return await fetchEntireDatasetAsync({
|
||||
paginatedGetterAsync,
|
||||
progressBarLabel: 'Fetching Apple devices...',
|
||||
});
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<AppleDevicesByAppleTeamQuery>(
|
||||
gql`
|
||||
query AppleDevicesByAppleTeamQuery($accountId: ID!, $appleTeamIdentifier: String!) {
|
||||
appleTeam {
|
||||
byAppleTeamIdentifier(accountId: $accountId, identifier: $appleTeamIdentifier) {
|
||||
id
|
||||
...AppleTeamFragment
|
||||
appleDevices {
|
||||
id
|
||||
...AppleDeviceFragment
|
||||
appleTeam {
|
||||
id
|
||||
...AppleTeamFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${print(AppleTeamFragmentNode)}
|
||||
${print(AppleDeviceFragmentNode)}
|
||||
`,
|
||||
{
|
||||
accountId,
|
||||
appleTeamIdentifier,
|
||||
},
|
||||
{
|
||||
additionalTypenames: ['AppleDevice'],
|
||||
requestPolicy: useCache ? 'cache-first' : 'network-only',
|
||||
}
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
assert(
|
||||
data.appleTeam.byAppleTeamIdentifier,
|
||||
'byAppleTeamIdentifier should be defined in this context - enforced by GraphQL'
|
||||
);
|
||||
const { appleDevices } = data.appleTeam.byAppleTeamIdentifier;
|
||||
assert(appleDevices, 'Apple Devices should be defined in this context - enforced by GraphQL');
|
||||
return appleDevices;
|
||||
},
|
||||
|
||||
async getAllForAppleTeamAsync(
|
||||
@@ -87,7 +113,6 @@ export const AppleDeviceQuery = {
|
||||
deviceClass
|
||||
enabled
|
||||
model
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,21 +138,41 @@ export const AppleDeviceQuery = {
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
identifier: string
|
||||
): Promise<AppleDeviceFragmentWithAppleTeam> {
|
||||
const paginatedGetterAsync = async (
|
||||
relayArgs: QueryParams
|
||||
): Promise<Connection<AppleDeviceFragmentWithAppleTeam>> => {
|
||||
return await AppleDeviceQuery.getAllForAccountPaginatedAsync(graphqlClient, accountName, {
|
||||
...relayArgs,
|
||||
filter: {
|
||||
identifier,
|
||||
},
|
||||
});
|
||||
};
|
||||
const devices = await fetchEntireDatasetAsync({
|
||||
paginatedGetterAsync,
|
||||
});
|
||||
const device = devices[0];
|
||||
): Promise<AppleDevicesByIdentifierQueryResult> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<AppleDevicesByIdentifierQuery>(
|
||||
gql`
|
||||
query AppleDevicesByIdentifier($accountName: String!, $identifier: String!) {
|
||||
account {
|
||||
byName(accountName: $accountName) {
|
||||
id
|
||||
appleDevices(identifier: $identifier) {
|
||||
id
|
||||
model
|
||||
identifier
|
||||
name
|
||||
deviceClass
|
||||
enabled
|
||||
appleTeam {
|
||||
id
|
||||
appleTeamIdentifier
|
||||
appleTeamName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ accountName, identifier },
|
||||
{
|
||||
additionalTypenames: ['AppleDevice', 'AppleTeam'],
|
||||
}
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
|
||||
const device = data.account.byName.appleDevices[0];
|
||||
if (!device) {
|
||||
throw new DeviceNotFoundError(
|
||||
`Device with id ${identifier} was not found on account ${accountName}.`
|
||||
@@ -135,86 +180,4 @@ export const AppleDeviceQuery = {
|
||||
}
|
||||
return device;
|
||||
},
|
||||
async getAllForAccountPaginatedAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
{
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
filter,
|
||||
useCache = true,
|
||||
}: {
|
||||
after?: string;
|
||||
first?: number;
|
||||
before?: string;
|
||||
last?: number;
|
||||
filter?: AppleDeviceFilterInput;
|
||||
useCache?: boolean;
|
||||
}
|
||||
): Promise<AppleDevicesPaginatedByAccountQuery['account']['byName']['appleDevicesPaginated']> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<AppleDevicesPaginatedByAccountQuery>(
|
||||
gql`
|
||||
query AppleDevicesPaginatedByAccountQuery(
|
||||
$accountName: String!
|
||||
$after: String
|
||||
$first: Int
|
||||
$before: String
|
||||
$last: Int
|
||||
$filter: AppleDeviceFilterInput
|
||||
) {
|
||||
account {
|
||||
byName(accountName: $accountName) {
|
||||
id
|
||||
appleDevicesPaginated(
|
||||
after: $after
|
||||
first: $first
|
||||
before: $before
|
||||
last: $last
|
||||
filter: $filter
|
||||
) {
|
||||
edges {
|
||||
cursor
|
||||
node {
|
||||
id
|
||||
...AppleDeviceFragment
|
||||
appleTeam {
|
||||
id
|
||||
...AppleTeamFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${print(AppleTeamFragmentNode)}
|
||||
${print(AppleDeviceFragmentNode)}
|
||||
`,
|
||||
{
|
||||
accountName,
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
filter,
|
||||
},
|
||||
{
|
||||
additionalTypenames: ['AppleDevice'],
|
||||
requestPolicy: useCache ? 'cache-first' : 'network-only',
|
||||
}
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
return data.account.byName.appleDevicesPaginated;
|
||||
},
|
||||
};
|
||||
+7
-60
@@ -5,14 +5,13 @@ import gql from 'graphql-tag';
|
||||
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { withErrorHandlingAsync } from '../../../../../graphql/client';
|
||||
import {
|
||||
AppleDistributionCertificateByAccountQuery,
|
||||
AppleDistributionCertificateByAppQuery,
|
||||
AppleDistributionCertificateFragment,
|
||||
AppleDistributionCertificatesPaginatedByAccountQuery,
|
||||
IosDistributionType,
|
||||
} from '../../../../../graphql/generated';
|
||||
import { AppleDistributionCertificateFragmentNode } from '../../../../../graphql/types/credentials/AppleDistributionCertificate';
|
||||
import { AppleTeamFragmentNode } from '../../../../../graphql/types/credentials/AppleTeam';
|
||||
import { Connection, QueryParams, fetchEntireDatasetAsync } from '../../../../../utils/relay';
|
||||
|
||||
export const AppleDistributionCertificateQuery = {
|
||||
async getForAppAsync(
|
||||
@@ -82,65 +81,17 @@ export const AppleDistributionCertificateQuery = {
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string
|
||||
): Promise<AppleDistributionCertificateFragment[]> {
|
||||
const paginatedGetterAsync = async (
|
||||
relayArgs: QueryParams
|
||||
): Promise<Connection<AppleDistributionCertificateFragment>> => {
|
||||
return await AppleDistributionCertificateQuery.getAllForAccountPaginatedAsync(
|
||||
graphqlClient,
|
||||
accountName,
|
||||
relayArgs
|
||||
);
|
||||
};
|
||||
return await fetchEntireDatasetAsync({
|
||||
paginatedGetterAsync,
|
||||
progressBarLabel: 'fetching Apple Distribution Certificates...',
|
||||
});
|
||||
},
|
||||
async getAllForAccountPaginatedAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
{
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
}: { after?: string; first?: number; before?: string; last?: number }
|
||||
): Promise<
|
||||
AppleDistributionCertificatesPaginatedByAccountQuery['account']['byName']['appleDistributionCertificatesPaginated']
|
||||
> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<AppleDistributionCertificatesPaginatedByAccountQuery>(
|
||||
.query<AppleDistributionCertificateByAccountQuery>(
|
||||
gql`
|
||||
query AppleDistributionCertificatesPaginatedByAccountQuery(
|
||||
$accountName: String!
|
||||
$after: String
|
||||
$first: Int
|
||||
$before: String
|
||||
$last: Int
|
||||
) {
|
||||
query AppleDistributionCertificateByAccountQuery($accountName: String!) {
|
||||
account {
|
||||
byName(accountName: $accountName) {
|
||||
id
|
||||
appleDistributionCertificatesPaginated(
|
||||
after: $after
|
||||
first: $first
|
||||
before: $before
|
||||
last: $last
|
||||
) {
|
||||
edges {
|
||||
cursor
|
||||
node {
|
||||
id
|
||||
...AppleDistributionCertificateFragment
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
appleDistributionCertificates {
|
||||
id
|
||||
...AppleDistributionCertificateFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,10 +100,6 @@ export const AppleDistributionCertificateQuery = {
|
||||
`,
|
||||
{
|
||||
accountName,
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
},
|
||||
{
|
||||
additionalTypenames: ['AppleDistributionCertificate'],
|
||||
@@ -160,6 +107,6 @@ export const AppleDistributionCertificateQuery = {
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
return data.account.byName.appleDistributionCertificatesPaginated;
|
||||
return data.account.byName.appleDistributionCertificates;
|
||||
},
|
||||
};
|
||||
@@ -3,75 +3,25 @@ import gql from 'graphql-tag';
|
||||
|
||||
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { withErrorHandlingAsync } from '../../../../../graphql/client';
|
||||
import {
|
||||
ApplePushKeyFragment,
|
||||
ApplePushKeysPaginatedByAccountQuery,
|
||||
} from '../../../../../graphql/generated';
|
||||
import { ApplePushKeyByAccountQuery, ApplePushKeyFragment } from '../../../../../graphql/generated';
|
||||
import { ApplePushKeyFragmentNode } from '../../../../../graphql/types/credentials/ApplePushKey';
|
||||
import { Connection, QueryParams, fetchEntireDatasetAsync } from '../../../../../utils/relay';
|
||||
|
||||
export const ApplePushKeyQuery = {
|
||||
async getAllForAccountAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string
|
||||
): Promise<ApplePushKeyFragment[]> {
|
||||
const paginatedGetterAsync = async (
|
||||
relayArgs: QueryParams
|
||||
): Promise<Connection<ApplePushKeyFragment>> => {
|
||||
return await ApplePushKeyQuery.getAllForAccountPaginatedAsync(
|
||||
graphqlClient,
|
||||
accountName,
|
||||
relayArgs
|
||||
);
|
||||
};
|
||||
return await fetchEntireDatasetAsync({
|
||||
paginatedGetterAsync,
|
||||
progressBarLabel: 'fetching Apple Push Keys...',
|
||||
});
|
||||
},
|
||||
async getAllForAccountPaginatedAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
accountName: string,
|
||||
{
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
}: { after?: string; first?: number; before?: string; last?: number }
|
||||
): Promise<ApplePushKeysPaginatedByAccountQuery['account']['byName']['applePushKeysPaginated']> {
|
||||
const data = await withErrorHandlingAsync(
|
||||
graphqlClient
|
||||
.query<ApplePushKeysPaginatedByAccountQuery>(
|
||||
.query<ApplePushKeyByAccountQuery>(
|
||||
gql`
|
||||
query ApplePushKeysPaginatedByAccountQuery(
|
||||
$accountName: String!
|
||||
$after: String
|
||||
$first: Int
|
||||
$before: String
|
||||
$last: Int
|
||||
) {
|
||||
query ApplePushKeyByAccountQuery($accountName: String!) {
|
||||
account {
|
||||
byName(accountName: $accountName) {
|
||||
id
|
||||
applePushKeysPaginated(
|
||||
after: $after
|
||||
first: $first
|
||||
before: $before
|
||||
last: $last
|
||||
) {
|
||||
edges {
|
||||
cursor
|
||||
node {
|
||||
id
|
||||
...ApplePushKeyFragment
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
applePushKeys {
|
||||
id
|
||||
...ApplePushKeyFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,10 +30,6 @@ export const ApplePushKeyQuery = {
|
||||
`,
|
||||
{
|
||||
accountName,
|
||||
after,
|
||||
first,
|
||||
before,
|
||||
last,
|
||||
},
|
||||
{
|
||||
additionalTypenames: ['ApplePushKey'],
|
||||
@@ -91,6 +37,6 @@ export const ApplePushKeyQuery = {
|
||||
)
|
||||
.toPromise()
|
||||
);
|
||||
return data.account.byName.applePushKeysPaginated;
|
||||
return data.account.byName.applePushKeys;
|
||||
},
|
||||
};
|
||||
@@ -13,9 +13,7 @@ export enum Scope {
|
||||
export enum AndroidActionType {
|
||||
ManageBuildCredentials,
|
||||
ManageFcm,
|
||||
ManageGoogleServiceAccountKeyForSubmissions,
|
||||
ManageGoogleServiceAccount,
|
||||
ManageGoogleServiceAccountKeyForFcmV1,
|
||||
ManageGoogleServiceAccountKey,
|
||||
ManageCredentialsJson,
|
||||
GoBackToCaller,
|
||||
GoBackToHighLevelActions,
|
||||
@@ -26,16 +24,11 @@ export enum AndroidActionType {
|
||||
CreateFcm,
|
||||
RemoveFcm,
|
||||
CreateGsaKey,
|
||||
UseExistingGsaKeyForSubmissions,
|
||||
UseExistingGsaKey,
|
||||
RemoveGsaKey,
|
||||
SetUpGsaKeyForSubmissions,
|
||||
CreateGsaKeyForFcmV1,
|
||||
UseExistingGsaKeyForFcmV1,
|
||||
RemoveGsaKeyForFcmV1,
|
||||
SetUpGsaKeyForFcmV1,
|
||||
SetUpGsaKey,
|
||||
UpdateCredentialsJson,
|
||||
SetUpBuildCredentialsFromCredentialsJson,
|
||||
SetUpBuildCredentials,
|
||||
}
|
||||
|
||||
export enum IosActionType {
|
||||
|
||||
@@ -7,13 +7,13 @@ export const highLevelActions: ActionInfo[] = [
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.ManageGoogleServiceAccount,
|
||||
title: 'Google Service Account',
|
||||
value: AndroidActionType.ManageFcm,
|
||||
title: 'Push Notifications: Manage your FCM API Key',
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.ManageFcm,
|
||||
title: 'Push Notifications (Legacy): Manage your FCM (Legacy) API Key',
|
||||
value: AndroidActionType.ManageGoogleServiceAccountKey,
|
||||
title: 'Google Service Account: Manage your Service Account Key',
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
{
|
||||
@@ -92,58 +92,22 @@ export const fcmActions: ActionInfo[] = [
|
||||
},
|
||||
];
|
||||
|
||||
export const gsaKeyActionsForFcmV1: ActionInfo[] = [
|
||||
export const gsaKeyActions: ActionInfo[] = [
|
||||
{
|
||||
value: AndroidActionType.SetUpGsaKeyForFcmV1,
|
||||
title: 'Set up a Google Service Account Key for Push Notifications (FCM V1)',
|
||||
value: AndroidActionType.SetUpGsaKey,
|
||||
title: 'Set up a Google Service Account Key',
|
||||
scope: Scope.Project,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.UseExistingGsaKeyForFcmV1,
|
||||
title: 'Select an existing Google Service Account Key for Push Notifications (FCM V1)',
|
||||
scope: Scope.Project,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.GoBackToHighLevelActions,
|
||||
title: 'Go back',
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
];
|
||||
|
||||
export const gsaKeyActionsForSubmissions: ActionInfo[] = [
|
||||
{
|
||||
value: AndroidActionType.SetUpGsaKeyForSubmissions,
|
||||
title: 'Set up a Google Service Account Key for Play Store Submissions',
|
||||
scope: Scope.Project,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.UseExistingGsaKeyForSubmissions,
|
||||
title: 'Select an existing Google Service Account Key for Play Store Submissions',
|
||||
scope: Scope.Project,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.GoBackToHighLevelActions,
|
||||
title: 'Go back',
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
];
|
||||
|
||||
export const gsaActions: ActionInfo[] = [
|
||||
{
|
||||
value: AndroidActionType.ManageGoogleServiceAccountKeyForSubmissions,
|
||||
title: 'Manage your Google Service Account Key for Play Store Submissions',
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.ManageGoogleServiceAccountKeyForFcmV1,
|
||||
title: 'Manage your Google Service Account Key for Push Notifications (FCM V1)',
|
||||
scope: Scope.Manager,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.CreateGsaKey,
|
||||
title: 'Upload a Google Service Account Key',
|
||||
scope: Scope.Project,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.UseExistingGsaKey,
|
||||
title: 'Use an existing Google Service Account Key',
|
||||
scope: Scope.Project,
|
||||
},
|
||||
{
|
||||
value: AndroidActionType.RemoveGsaKey,
|
||||
title: 'Delete a Google Service Account Key',
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import { BuildProfile, EasJsonAccessor, EasJsonUtils } from '@expo/eas-json';
|
||||
|
||||
import Log from '../../log';
|
||||
|
||||
export class CheckBuildProfileFlagAgainstEasJson<T extends Platform> {
|
||||
private easJsonAccessor: EasJsonAccessor;
|
||||
|
||||
constructor(
|
||||
projectDir: string,
|
||||
private platform: T,
|
||||
private profileNameFromFlag: string
|
||||
) {
|
||||
this.easJsonAccessor = EasJsonAccessor.fromProjectPath(projectDir);
|
||||
}
|
||||
|
||||
async runAsync(): Promise<BuildProfile<T>> {
|
||||
const profileName = await this.getProfileNameFromEasConfigAsync();
|
||||
const easConfig = await EasJsonUtils.getBuildProfileAsync<T>(
|
||||
this.easJsonAccessor,
|
||||
this.platform,
|
||||
profileName
|
||||
);
|
||||
Log.succeed(`Using build profile: ${profileName}`);
|
||||
return easConfig;
|
||||
}
|
||||
|
||||
async getProfileNameFromEasConfigAsync(): Promise<string> {
|
||||
const buildProfileNames = await EasJsonUtils.getBuildProfileNamesAsync(this.easJsonAccessor);
|
||||
if (buildProfileNames.length === 0) {
|
||||
throw new Error(
|
||||
'You need at least one iOS build profile declared in eas.json. Go to https://docs.expo.dev/build/eas-json/ for more details'
|
||||
);
|
||||
} else if (buildProfileNames.length === 1) {
|
||||
return buildProfileNames[0];
|
||||
}
|
||||
|
||||
if (buildProfileNames.includes(this.profileNameFromFlag)) {
|
||||
return this.profileNameFromFlag;
|
||||
} else {
|
||||
throw new Error(
|
||||
`Build profile ${this.profileNameFromFlag} does not exist in eas.json. Go to https://docs.expo.dev/build/eas-json/ for more details`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,7 @@ import {
|
||||
buildCredentialsActions,
|
||||
credentialsJsonActions,
|
||||
fcmActions,
|
||||
gsaActions,
|
||||
gsaKeyActionsForFcmV1,
|
||||
gsaKeyActionsForSubmissions,
|
||||
gsaKeyActions,
|
||||
highLevelActions,
|
||||
} from './AndroidActions';
|
||||
import { CreateAndroidBuildCredentials } from './CreateAndroidBuildCredentials';
|
||||
@@ -21,8 +19,7 @@ import Log, { learnMore } from '../../log';
|
||||
import { GradleBuildContext, resolveGradleBuildContextAsync } from '../../project/android/gradle';
|
||||
import { promptAsync } from '../../prompts';
|
||||
import { AssignFcm } from '../android/actions/AssignFcm';
|
||||
import { AssignGoogleServiceAccountKeyForFcmV1 } from '../android/actions/AssignGoogleServiceAccountKeyForFcmV1';
|
||||
import { AssignGoogleServiceAccountKeyForSubmissions } from '../android/actions/AssignGoogleServiceAccountKeyForSubmissions';
|
||||
import { AssignGoogleServiceAccountKey } from '../android/actions/AssignGoogleServiceAccountKey';
|
||||
import {
|
||||
canCopyLegacyCredentialsAsync,
|
||||
getAppLookupParamsFromContextAsync,
|
||||
@@ -34,10 +31,8 @@ import { DownloadKeystore } from '../android/actions/DownloadKeystore';
|
||||
import { RemoveFcm } from '../android/actions/RemoveFcm';
|
||||
import { SelectAndRemoveGoogleServiceAccountKey } from '../android/actions/RemoveGoogleServiceAccountKey';
|
||||
import { RemoveKeystore } from '../android/actions/RemoveKeystore';
|
||||
import { SetUpBuildCredentials } from '../android/actions/SetUpBuildCredentials';
|
||||
import { SetUpBuildCredentialsFromCredentialsJson } from '../android/actions/SetUpBuildCredentialsFromCredentialsJson';
|
||||
import { SetUpGoogleServiceAccountKeyForFcmV1 } from '../android/actions/SetUpGoogleServiceAccountKeyForFcmV1';
|
||||
import { SetUpGoogleServiceAccountKeyForSubmissions } from '../android/actions/SetUpGoogleServiceAccountKeyForSubmissions';
|
||||
import { SetUpGoogleServiceAccountKey } from '../android/actions/SetUpGoogleServiceAccountKey';
|
||||
import { UpdateCredentialsJson } from '../android/actions/UpdateCredentialsJson';
|
||||
import { UseExistingGoogleServiceAccountKey } from '../android/actions/UseExistingGoogleServiceAccountKey';
|
||||
import {
|
||||
@@ -49,8 +44,8 @@ import { AndroidPackageNotDefinedError } from '../errors';
|
||||
|
||||
export class ManageAndroid {
|
||||
constructor(
|
||||
protected callingAction: Action,
|
||||
protected projectDir: string
|
||||
private callingAction: Action,
|
||||
private projectDir: string
|
||||
) {}
|
||||
|
||||
async runAsync(currentActions: ActionInfo[] = highLevelActions): Promise<void> {
|
||||
@@ -125,16 +120,8 @@ export class ManageAndroid {
|
||||
} else if (chosenAction === AndroidActionType.ManageFcm) {
|
||||
currentActions = fcmActions;
|
||||
continue;
|
||||
} else if (chosenAction === AndroidActionType.ManageGoogleServiceAccount) {
|
||||
currentActions = gsaActions;
|
||||
continue;
|
||||
} else if (
|
||||
chosenAction === AndroidActionType.ManageGoogleServiceAccountKeyForSubmissions
|
||||
) {
|
||||
currentActions = gsaKeyActionsForSubmissions;
|
||||
continue;
|
||||
} else if (chosenAction === AndroidActionType.ManageGoogleServiceAccountKeyForFcmV1) {
|
||||
currentActions = gsaKeyActionsForFcmV1;
|
||||
} else if (chosenAction === AndroidActionType.ManageGoogleServiceAccountKey) {
|
||||
currentActions = gsaKeyActions;
|
||||
continue;
|
||||
} else if (chosenAction === AndroidActionType.ManageCredentialsJson) {
|
||||
currentActions = credentialsJsonActions;
|
||||
@@ -165,7 +152,7 @@ export class ManageAndroid {
|
||||
}
|
||||
}
|
||||
|
||||
protected async createProjectContextAsync(
|
||||
private async createProjectContextAsync(
|
||||
ctx: CredentialsContext,
|
||||
buildProfile: BuildProfile<Platform.ANDROID>
|
||||
): Promise<GradleBuildContext | undefined> {
|
||||
@@ -173,7 +160,7 @@ export class ManageAndroid {
|
||||
return await resolveGradleBuildContextAsync(ctx.projectDir, buildProfile, ctx.vcsClient);
|
||||
}
|
||||
|
||||
protected async runProjectSpecificActionAsync(
|
||||
private async runProjectSpecificActionAsync(
|
||||
ctx: CredentialsContext,
|
||||
action: AndroidActionType,
|
||||
gradleContext?: GradleBuildContext
|
||||
@@ -206,31 +193,20 @@ export class ManageAndroid {
|
||||
await new AssignFcm(appLookupParams).runAsync(ctx, fcm);
|
||||
} else if (action === AndroidActionType.RemoveFcm) {
|
||||
await new RemoveFcm(appLookupParams).runAsync(ctx);
|
||||
} else if (action === AndroidActionType.SetUpGsaKeyForSubmissions) {
|
||||
await new SetUpGoogleServiceAccountKeyForSubmissions(appLookupParams).runAsync(ctx);
|
||||
} else if (action === AndroidActionType.UseExistingGsaKeyForSubmissions) {
|
||||
const gsaKey = await new UseExistingGoogleServiceAccountKey(appLookupParams.account).runAsync(
|
||||
ctx
|
||||
);
|
||||
if (gsaKey) {
|
||||
await new AssignGoogleServiceAccountKeyForSubmissions(appLookupParams).runAsync(
|
||||
ctx,
|
||||
gsaKey
|
||||
);
|
||||
}
|
||||
} else if (action === AndroidActionType.SetUpGsaKeyForFcmV1) {
|
||||
await new SetUpGoogleServiceAccountKeyForFcmV1(appLookupParams).runAsync(ctx);
|
||||
} else if (action === AndroidActionType.UseExistingGsaKeyForFcmV1) {
|
||||
const gsaKey = await new UseExistingGoogleServiceAccountKey(appLookupParams.account).runAsync(
|
||||
ctx
|
||||
);
|
||||
if (gsaKey) {
|
||||
await new AssignGoogleServiceAccountKeyForFcmV1(appLookupParams).runAsync(ctx, gsaKey);
|
||||
}
|
||||
} else if (action === AndroidActionType.CreateGsaKey) {
|
||||
await new CreateGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
|
||||
const gsaKey = await new CreateGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
|
||||
await new AssignGoogleServiceAccountKey(appLookupParams).runAsync(ctx, gsaKey);
|
||||
} else if (action === AndroidActionType.UseExistingGsaKey) {
|
||||
const gsaKey = await new UseExistingGoogleServiceAccountKey(appLookupParams.account).runAsync(
|
||||
ctx
|
||||
);
|
||||
if (gsaKey) {
|
||||
await new AssignGoogleServiceAccountKey(appLookupParams).runAsync(ctx, gsaKey);
|
||||
}
|
||||
} else if (action === AndroidActionType.RemoveGsaKey) {
|
||||
await new SelectAndRemoveGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
|
||||
} else if (action === AndroidActionType.SetUpGsaKey) {
|
||||
await new SetUpGoogleServiceAccountKey(appLookupParams).runAsync(ctx);
|
||||
} else if (action === AndroidActionType.UpdateCredentialsJson) {
|
||||
const buildCredentials = await new SelectExistingAndroidBuildCredentials(
|
||||
appLookupParams
|
||||
@@ -240,8 +216,6 @@ export class ManageAndroid {
|
||||
}
|
||||
} else if (action === AndroidActionType.SetUpBuildCredentialsFromCredentialsJson) {
|
||||
await new SetUpBuildCredentialsFromCredentialsJson(appLookupParams).runAsync(ctx);
|
||||
} else if (action === AndroidActionType.SetUpBuildCredentials) {
|
||||
await new SetUpBuildCredentials({ app: appLookupParams }).runAsync(ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,8 +56,8 @@ import { displayIosCredentials } from '../ios/utils/printCredentials';
|
||||
|
||||
export class ManageIos {
|
||||
constructor(
|
||||
protected callingAction: Action,
|
||||
protected projectDir: string
|
||||
private callingAction: Action,
|
||||
private projectDir: string
|
||||
) {}
|
||||
|
||||
async runAsync(currentActions: ActionInfo[] = highLevelActions): Promise<void> {
|
||||
@@ -182,7 +182,7 @@ export class ManageIos {
|
||||
}
|
||||
}
|
||||
|
||||
protected async createProjectContextAsync(
|
||||
private async createProjectContextAsync(
|
||||
ctx: CredentialsContext,
|
||||
account: AccountFragment,
|
||||
buildProfile: BuildProfile<Platform.IOS>
|
||||
@@ -215,7 +215,7 @@ export class ManageIos {
|
||||
};
|
||||
}
|
||||
|
||||
protected async runAccountSpecificActionAsync(
|
||||
private async runAccountSpecificActionAsync(
|
||||
ctx: CredentialsContext,
|
||||
account: AccountFragment,
|
||||
action: IosActionType
|
||||
@@ -235,7 +235,7 @@ export class ManageIos {
|
||||
}
|
||||
}
|
||||
|
||||
protected async runProjectSpecificActionAsync(
|
||||
private async runProjectSpecificActionAsync(
|
||||
ctx: CredentialsContext,
|
||||
app: App,
|
||||
targets: Target[],
|
||||
@@ -396,7 +396,7 @@ export class ManageIos {
|
||||
}
|
||||
}
|
||||
|
||||
protected async setupProvisioningProfileWithSpecificDistCertAsync(
|
||||
private async setupProvisioningProfileWithSpecificDistCertAsync(
|
||||
ctx: CredentialsContext,
|
||||
target: Target,
|
||||
appLookupParams: AppLookupParams,
|
||||
@@ -419,7 +419,7 @@ export class ManageIos {
|
||||
}
|
||||
}
|
||||
|
||||
protected async selectTargetAsync(targets: Target[]): Promise<Target> {
|
||||
private async selectTargetAsync(targets: Target[]): Promise<Target> {
|
||||
if (targets.length === 1) {
|
||||
return targets[0];
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import assert from 'assert';
|
||||
|
||||
import { AndroidActionType } from './Actions';
|
||||
import { CheckBuildProfileFlagAgainstEasJson } from './CheckBuildProfileFlagAgainstEasJson';
|
||||
import { Action } from './HelperActions';
|
||||
import { ManageAndroid } from './ManageAndroid';
|
||||
import { CredentialsContext, CredentialsContextProjectInfo } from '../context';
|
||||
|
||||
export class SetUpAndroidBuildCredentials extends ManageAndroid {
|
||||
constructor(
|
||||
callingAction: Action,
|
||||
projectDir: string,
|
||||
private setUpBuildCredentialsWithProfileNameFromFlag: string
|
||||
) {
|
||||
super(callingAction, projectDir);
|
||||
}
|
||||
|
||||
override async runAsync(): Promise<void> {
|
||||
const hasProjectContext = !!this.callingAction.projectInfo;
|
||||
const buildProfile = hasProjectContext
|
||||
? await new CheckBuildProfileFlagAgainstEasJson(
|
||||
this.projectDir,
|
||||
Platform.ANDROID,
|
||||
this.setUpBuildCredentialsWithProfileNameFromFlag
|
||||
).runAsync()
|
||||
: null;
|
||||
let projectInfo: CredentialsContextProjectInfo | null = null;
|
||||
if (hasProjectContext) {
|
||||
const { exp, projectId } = await this.callingAction.getDynamicPrivateProjectConfigAsync({
|
||||
env: buildProfile?.env,
|
||||
});
|
||||
projectInfo = { exp, projectId };
|
||||
}
|
||||
const ctx = new CredentialsContext({
|
||||
projectDir: process.cwd(),
|
||||
projectInfo,
|
||||
user: this.callingAction.actor,
|
||||
graphqlClient: this.callingAction.graphqlClient,
|
||||
analytics: this.callingAction.analytics,
|
||||
env: buildProfile?.env,
|
||||
nonInteractive: false,
|
||||
vcsClient: this.callingAction.vcsClient,
|
||||
});
|
||||
|
||||
let gradleContext;
|
||||
if (ctx.hasProjectContext) {
|
||||
assert(buildProfile, 'buildProfile must be defined in a project context');
|
||||
gradleContext = await this.createProjectContextAsync(ctx, buildProfile);
|
||||
}
|
||||
|
||||
if (this.setUpBuildCredentialsWithProfileNameFromFlag) {
|
||||
await this.runProjectSpecificActionAsync(
|
||||
ctx,
|
||||
AndroidActionType.SetUpBuildCredentials,
|
||||
gradleContext
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
|
||||
import { Analytics } from '../../analytics/AnalyticsManager';
|
||||
import { DynamicConfigContextFn } from '../../commandUtils/context/DynamicProjectConfigContextField';
|
||||
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { Actor } from '../../user/User';
|
||||
import { Client } from '../../vcs/vcs';
|
||||
import { CredentialsContextProjectInfo } from '../context';
|
||||
import { SetUpAndroidBuildCredentials } from '../manager/SetUpAndroidBuildCredentials';
|
||||
import { SetUpIosBuildCredentials } from '../manager/SetUpIosBuildCredentials';
|
||||
|
||||
export class SetUpBuildCredentialsCommandAction {
|
||||
constructor(
|
||||
public readonly actor: Actor,
|
||||
public readonly graphqlClient: ExpoGraphqlClient,
|
||||
public readonly vcsClient: Client,
|
||||
public readonly analytics: Analytics,
|
||||
public readonly projectInfo: CredentialsContextProjectInfo | null,
|
||||
public readonly getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn,
|
||||
private readonly platform: Platform,
|
||||
private readonly profileName: string
|
||||
) {}
|
||||
|
||||
async runAsync(): Promise<void> {
|
||||
if (this.platform === Platform.IOS) {
|
||||
return await new SetUpIosBuildCredentials(this, process.cwd(), this.profileName).runAsync();
|
||||
}
|
||||
return await new SetUpAndroidBuildCredentials(this, process.cwd(), this.profileName).runAsync();
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
import { Platform } from '@expo/eas-build-job';
|
||||
import assert from 'assert';
|
||||
import nullthrows from 'nullthrows';
|
||||
|
||||
import { IosActionType } from './Actions';
|
||||
import { CheckBuildProfileFlagAgainstEasJson } from './CheckBuildProfileFlagAgainstEasJson';
|
||||
import { Action } from './HelperActions';
|
||||
import { ManageIos } from './ManageIos';
|
||||
import { AccountFragment } from '../../graphql/generated';
|
||||
import { getOwnerAccountForProjectIdAsync } from '../../project/projectUtils';
|
||||
import { ensureActorHasPrimaryAccount } from '../../user/actions';
|
||||
import { CredentialsContext, CredentialsContextProjectInfo } from '../context';
|
||||
|
||||
export class SetUpIosBuildCredentials extends ManageIos {
|
||||
constructor(
|
||||
callingAction: Action,
|
||||
projectDir: string,
|
||||
private setUpBuildCredentialsWithProfileNameFromFlag: string
|
||||
) {
|
||||
super(callingAction, projectDir);
|
||||
}
|
||||
|
||||
override async runAsync(): Promise<void> {
|
||||
const buildProfile = this.callingAction.projectInfo
|
||||
? await new CheckBuildProfileFlagAgainstEasJson(
|
||||
this.projectDir,
|
||||
Platform.IOS,
|
||||
this.setUpBuildCredentialsWithProfileNameFromFlag
|
||||
).runAsync()
|
||||
: null;
|
||||
|
||||
let projectInfo: CredentialsContextProjectInfo | null = null;
|
||||
if (this.callingAction.projectInfo) {
|
||||
const { exp, projectId } = await this.callingAction.getDynamicPrivateProjectConfigAsync({
|
||||
env: buildProfile?.env,
|
||||
});
|
||||
projectInfo = { exp, projectId };
|
||||
}
|
||||
|
||||
const ctx = new CredentialsContext({
|
||||
projectDir: process.cwd(),
|
||||
projectInfo,
|
||||
user: this.callingAction.actor,
|
||||
graphqlClient: this.callingAction.graphqlClient,
|
||||
analytics: this.callingAction.analytics,
|
||||
env: buildProfile?.env,
|
||||
nonInteractive: false,
|
||||
vcsClient: this.callingAction.vcsClient,
|
||||
});
|
||||
|
||||
await ctx.bestEffortAppStoreAuthenticateAsync();
|
||||
|
||||
const getAccountForProjectAsync = async (projectId: string): Promise<AccountFragment> => {
|
||||
return await getOwnerAccountForProjectIdAsync(ctx.graphqlClient, projectId);
|
||||
};
|
||||
|
||||
const account = ctx.hasProjectContext
|
||||
? await getAccountForProjectAsync(ctx.projectId)
|
||||
: ensureActorHasPrimaryAccount(ctx.user);
|
||||
|
||||
let app = null;
|
||||
let targets = null;
|
||||
if (ctx.hasProjectContext) {
|
||||
assert(buildProfile, 'buildProfile must be defined in project context');
|
||||
const projectContext = await this.createProjectContextAsync(ctx, account, buildProfile);
|
||||
app = projectContext.app;
|
||||
targets = projectContext.targets;
|
||||
}
|
||||
|
||||
await this.runProjectSpecificActionAsync(
|
||||
ctx,
|
||||
nullthrows(app, 'app must be defined in project context'),
|
||||
nullthrows(targets, 'targets must be defined in project context'),
|
||||
nullthrows(buildProfile, 'buildProfile must be defined in project context'),
|
||||
IosActionType.SetUpBuildCredentials
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ export default class DeviceCreateAction {
|
||||
await runDeveloperPortalMethodAsync(
|
||||
this.graphqlClient,
|
||||
this.appStoreApi,
|
||||
this.account,
|
||||
this.account.id,
|
||||
this.appleTeam
|
||||
);
|
||||
} else if (method === RegistrationMethod.INPUT) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import AppStoreApi from '../../../credentials/ios/appstore/AppStoreApi';
|
||||
import { getRequestContext } from '../../../credentials/ios/appstore/authenticate';
|
||||
import { AuthCtx } from '../../../credentials/ios/appstore/authenticateTypes';
|
||||
import { AccountFragment, AppleDeviceClass, AppleTeam } from '../../../graphql/generated';
|
||||
import { AppleDeviceClass, AppleTeam } from '../../../graphql/generated';
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { promptAsync } from '../../../prompts';
|
||||
@@ -25,14 +25,14 @@ const DEVICE_CLASS_TO_GRAPHQL_TYPE: Partial<Record<DeviceClass, AppleDeviceClass
|
||||
export async function runDeveloperPortalMethodAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
appStoreApi: AppStoreApi,
|
||||
account: AccountFragment,
|
||||
accountId: string,
|
||||
appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>
|
||||
): Promise<void> {
|
||||
const appleAuthCtx = await appStoreApi.ensureAuthenticatedAsync();
|
||||
const unregisteredPortalDevices = await findUnregisteredPortalDevicesAsync(
|
||||
graphqlClient,
|
||||
appleAuthCtx,
|
||||
account.name,
|
||||
accountId,
|
||||
appleTeam
|
||||
);
|
||||
if (unregisteredPortalDevices.length === 0) {
|
||||
@@ -40,7 +40,7 @@ export async function runDeveloperPortalMethodAsync(
|
||||
return;
|
||||
}
|
||||
const devicesToImport = await chooseDevicesToImportAsync(unregisteredPortalDevices);
|
||||
await importDevicesAsync(graphqlClient, account.id, appleTeam, devicesToImport);
|
||||
await importDevicesAsync(graphqlClient, accountId, appleTeam, devicesToImport);
|
||||
}
|
||||
|
||||
async function importDevicesAsync(
|
||||
@@ -88,12 +88,12 @@ async function importDeviceChunkAsync(
|
||||
async function findUnregisteredPortalDevicesAsync(
|
||||
graphqlClient: ExpoGraphqlClient,
|
||||
appleAuthCtx: AuthCtx,
|
||||
accountName: string,
|
||||
accountId: string,
|
||||
appleTeam: Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName' | 'id'>
|
||||
): Promise<Device[]> {
|
||||
const expoRegisteredDevices = await AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(
|
||||
graphqlClient,
|
||||
accountName,
|
||||
accountId,
|
||||
appleTeam.appleTeamIdentifier,
|
||||
{ useCache: false }
|
||||
);
|
||||
|
||||
@@ -10,7 +10,6 @@ const DEVICE_CLASS_DISPLAY_NAMES: Record<AppleDeviceClass, string> = {
|
||||
[AppleDeviceClass.Iphone]: 'iPhone',
|
||||
[AppleDeviceClass.Ipad]: 'iPad',
|
||||
[AppleDeviceClass.Mac]: 'Mac',
|
||||
[AppleDeviceClass.Unknown]: 'Unknown',
|
||||
};
|
||||
|
||||
function formatDeviceClass(device: Device | NewDevice): string {
|
||||
|
||||
@@ -5,7 +5,6 @@ export function createCtxMock(options: { nonInteractive?: boolean } = {}): EASUp
|
||||
return {
|
||||
graphqlClient: jest.fn() as any,
|
||||
nonInteractive: options.nonInteractive ?? false,
|
||||
app: { exp: testAppJson, projectId: 'test-project-id', projectDir: '/' },
|
||||
vcsClient: jest.fn() as any,
|
||||
app: { exp: testAppJson, projectId: 'test-project-id' },
|
||||
};
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
import { ExpoConfig } from '@expo/config-types';
|
||||
|
||||
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { Client } from '../vcs/vcs';
|
||||
|
||||
export type EASUpdateContext = {
|
||||
graphqlClient: ExpoGraphqlClient;
|
||||
nonInteractive: boolean;
|
||||
app: { exp: ExpoConfig; projectId: string; projectDir: string };
|
||||
vcsClient: Client;
|
||||
app: { exp: ExpoConfig; projectId: string };
|
||||
};
|
||||
|
||||
export interface EASUpdateAction<T = any> {
|
||||
|
||||
+82
-507
File diff suppressed because it is too large.
Load diff
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user