Skip to content

Commit

Permalink
Add config property to eas.schema.json (#2248)
Browse files Browse the repository at this point in the history
# Why

We want users to feel like they're adding something we support.

# How

Added `config` property to build profile level and platform-specific profile properties levels.

Also prettified the file according to my JSON Tools VS Code extension. Let me know if it should be deprettified.

# Test Plan

None.
  • Loading branch information
sjchmiela authored Feb 23, 2024
1 parent b6b22b7 commit 7d47060
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is the log of notable changes to EAS CLI and related packages.
### 🐛 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))

### 🧹 Chores

Expand Down
88 changes: 75 additions & 13 deletions packages/eas-json/schema/eas.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@
"version": {
"type": "string",
"description": "The compatible versions of EAS CLI with this config",
"examples": [">=0.54.1"]
"examples": [
">=0.54.1"
]
},
"requireCommit": {
"type": "boolean",
"description": "If all changes required to be committed before building or submitting"
},
"appVersionSource": {
"enum": ["local", "remote"],
"enum": [
"local",
"remote"
],
"markdownDescription": "Version policy defines whether version of your app should be based on your local project or values stored on EAS servers (remote).\n\nThis is the configuration required for `eas build:version:set` and works with the `autoIncrement` options per platform.",
"markdownEnumDescriptions": [
"When using local, the `autoIncrement` is based on your local project values.",
Expand Down Expand Up @@ -102,7 +107,10 @@
"description": "The name of the build profile that the current one should inherit values from. This value can't be specified per platform."
},
"credentialsSource": {
"enum": ["remote", "local"],
"enum": [
"remote",
"local"
],
"description": "The source of credentials used to sign build artifacts. Learn more: https://docs.expo.dev/app-signing/local-credentials/",
"markdownDescription": "The source of credentials used to sign build artifacts.\n\n- `remote` - if you want to use the credentials managed by EAS.\n- `local` - if you want to provide your own `credentials.json` file. [learn more](https://docs.expo.dev/app-signing/local-credentials/)",
"default": "remote",
Expand All @@ -124,7 +132,10 @@
"markdownDescription": "The channel is a name we can give to multiple builds to identify them easily. [Learn more](https://docs.expo.dev/eas-update/how-eas-update-works/)\n\n**This field only applies to the EAS Update service**, if your project still uses Classic Updates then use the [releaseChannel](https://docs.expo.dev/build-reference/eas-json/#releasechannel) field instead."
},
"distribution": {
"enum": ["internal", "store"],
"enum": [
"internal",
"store"
],
"description": "The method of distributing your app. Learn more: https://docs.expo.dev/build/internal-distribution/",
"markdownDescription": "The method of distributing your app.\n\n- `internal` - with this option you'll be able to share your build URLs with anyone, and they will be able to install the builds to their devices straight from the Expo website. When using `internal`, make sure the build produces an APK or IPA file. Otherwise, the shareable URL will be useless. [Learn more](https://docs.expo.dev/build/internal-distribution/)\n- `store` - produces builds for store uploads, your build URLs won't be shareable.",
"markdownEnumDescriptions": [
Expand Down Expand Up @@ -203,13 +214,21 @@
"default": "default",
"anyOf": [
{
"enum": ["default", "medium", "large"]
"enum": [
"default",
"medium",
"large"
]
},
{
"type": "string"
}
]
},
"config": {
"description": "Custom workflow file name that will be used to run this build. You can also specify this property on platform level for platform-specific workflows. Learn more: https://docs.expo.dev/custom-builds/get-started/",
"type": "string"
},
"android": {
"$ref": "#/definitions/BuildProfileAndroid"
},
Expand Down Expand Up @@ -263,7 +282,11 @@
"default": "default",
"anyOf": [
{
"enum": ["default", "medium", "large"]
"enum": [
"default",
"medium",
"large"
]
},
{
"type": "string"
Expand All @@ -275,7 +298,12 @@
"description": "The version of Android NDK."
},
"autoIncrement": {
"enum": [false, true, "versionCode", "version"],
"enum": [
false,
true,
"versionCode",
"version"
],
"description": "Controls how EAS CLI bumps your application build version.",
"markdownDescription": "Controls how EAS CLI bumps your application build version.\n\nAllowed values:\n- `\"version\"` - bumps the patch of `expo.version` (e.g. `1.2.3` -> `1.2.4`).\n- `\"versionCode\"` (or `true`) - bumps `expo.android.versionCode` (e.g. `3` -> `4`).\n- `false` - versions won't be bumped automatically (default)\n\nIn the case of a bare project, it also updates versions in native code. `expo.version` corresponds to `versionName` and `expo.android.versionCode` to `versionCode` in the `build.gradle`. Google Play uses these values to identify the app build, `versionName` is the version visible to users, whereas `versionCode` defines the version number. The combination of those needs to be unique, so you can bump either of them.\n\nThis feature is not intended for use with dynamic configuration (app.config.js). EAS CLI will throw an error if you don't use app.json.",
"default": false,
Expand All @@ -287,7 +315,10 @@
]
},
"buildType": {
"enum": ["app-bundle", "apk"],
"enum": [
"app-bundle",
"apk"
],
"description": "Type of the artifact you want to build.",
"markdownDescription": "Type of the artifact you want to build. It controls what Gradle task will be used, can be overridden by `gradleCommand` or `developmentClient: true` option.\n- `app-bundle` - `:app:bundleRelease`\n- `apk` - `:app:assembleRelease`",
"markdownEnumDescriptions": [
Expand All @@ -311,6 +342,10 @@
"description": "[DEPRECATED] Use `applicationArchivePath` instead. Path (or pattern) where EAS Build is going to look for the build artifacts. See: https://github.com/mrmlnc/fast-glob#pattern-syntax",
"markdownDescription": "[DEPRECATED] Use `applicationArchivePath` instead. Path (or pattern) where EAS Build is going to look for the build artifacts. EAS Build uses the `fast-glob` npm package for pattern matching ([see their README to learn more about the syntax you can use](https://github.com/mrmlnc/fast-glob#pattern-syntax)).",
"default": "android/app/build/outputs/**/*.{apk,aab}"
},
"config": {
"description": "Custom workflow file name that will be used to run this Android build. You can also specify this property on profile levle for platform-agnostic workflows. Learn more: https://docs.expo.dev/custom-builds/get-started/",
"type": "string"
}
}
},
Expand All @@ -330,14 +365,22 @@
"default": false
},
"enterpriseProvisioning": {
"enum": ["universal", "adhoc"],
"enum": [
"universal",
"adhoc"
],
"markdownDescription": "Provisioning method used for `\"distribution\": \"internal\"` when you have an Apple account with Apple Developer Enterprise Program membership.\n\nYou can choose if you want to use `adhoc` or `universal` provisioning. The latter is recommended as it does not require you to register each individual device. If you don't provide this option and you still authenticate with an enterprise team, you'll be prompted which provisioning method to use.",
"markdownEnumDescriptions": [
"Recommended as it does not require you to register each individual device"
]
},
"autoIncrement": {
"enum": [false, true, "buildNumber", "version"],
"enum": [
false,
true,
"buildNumber",
"version"
],
"description": "Controls how EAS CLI bumps your application build version.",
"markdownDescription": "Controls how EAS CLI bumps your application build version.\n\nAllowed values:\n\n- `\"version\"` - bumps the patch of `expo.version` (e.g. `1.2.3` -> `1.2.4`).\n- `\"buildNumber\"` (or `true`) - bumps the last component of `expo.ios.buildNumber` (e.g. `1.2.3.39` -> `1.2.3.40`).\n- `false` - versions won't be bumped automatically (default)\n\nIn the case of a bare project, it also updates versions in native code. `expo.version` corresponds to `CFBundleShortVersionString` and `expo.ios.buildNumber` to `CFBundleVersion` in the `Info.plist`. The App Store is using those values to identify the app build, `CFBundleShortVersionString` is the version visible to users, whereas `CFBundleVersion` defines the build number. The combination of those needs to be unique, so you can bump either of them.\n\nThis feature is not intended for use with dynamic configuration (app.config.js). EAS CLI will throw an error if you don't use app.json.",
"default": false,
Expand Down Expand Up @@ -392,7 +435,12 @@
"default": "default",
"anyOf": [
{
"enum": ["default", "medium", "large", "m-medium"]
"enum": [
"default",
"medium",
"large",
"m-medium"
]
},
{
"type": "string"
Expand Down Expand Up @@ -433,6 +481,10 @@
"type": "string",
"description": "[DEPRECATED] Use `applicationArchivePath` instead. Path (or pattern) where EAS Build is going to look for the build artifacts. See: https://github.com/mrmlnc/fast-glob#pattern-syntax",
"markdownDescription": "[DEPRECATED] Use `applicationArchivePath` instead. Path (or pattern) where EAS Build is going to look for the build artifacts.\n\nEAS Build uses the `fast-glob` npm package for pattern matching, ([See their README to learn more about the syntax you can use](https://github.com/mrmlnc/fast-glob#pattern-syntax)).\n\nYou should modify that path only if you are using a custom `Gymfile`.\n\nThe default is `ios/build/Build/Products/*-iphonesimulator/*.app` when building for simulator and `ios/build/*.ipa` in other cases."
},
"config": {
"description": "Custom workflow file name that will be used to run this iOS build. You can also specify this property on profile levle for platform-agnostic workflows. Learn more: https://docs.expo.dev/custom-builds/get-started/",
"type": "string"
}
}
},
Expand Down Expand Up @@ -472,7 +524,12 @@
"markdownDescription": "Path to the JSON file with service account key used to authenticate with Google Play. [Learn more](https://expo.fyi/creating-google-service-account)"
},
"track": {
"enum": ["beta", "alpha", "internal", "production"],
"enum": [
"beta",
"alpha",
"internal",
"production"
],
"description": "The track of the application to use. Learn more: https://support.google.com/googleplay/android-developer/answer/9859348?hl=en",
"markdownDescription": "The [track of the application](https://support.google.com/googleplay/android-developer/answer/9859348?hl=en) to use.",
"markdownEnumDescriptions": [
Expand All @@ -483,7 +540,12 @@
]
},
"releaseStatus": {
"enum": ["draft", "inProgress", "halted", "completed"],
"enum": [
"draft",
"inProgress",
"halted",
"completed"
],
"description": "The status of a release. Learn more: https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks",
"markdownDescription": "The status of a release. [Learn more](https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks)",
"enumDescriptions": [
Expand Down

0 comments on commit 7d47060

Please sign in to comment.