mirror of
https://github.com/expo/turtle.git
synced 2026-11-14 19:12:55 -10:00
Compare commits
102
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7d794bb9d | ||
|
|
71cbac7458 | ||
|
|
cee42b1d6c | ||
|
|
69905bd886 | ||
|
|
37a8cff615 | ||
|
|
c8992aa2f4 | ||
|
|
38e05bc20a | ||
|
|
4a8e14fa8b | ||
|
|
77c7fce666 | ||
|
|
7f6faecbd1 | ||
|
|
718e3e9ab6 | ||
|
|
2a120fa22c | ||
|
|
1b6e482be5 | ||
|
|
5072a98b50 | ||
|
|
0584fd20fb | ||
|
|
701d6afcf7 | ||
|
|
87515eae23 | ||
|
|
27de1abc09 | ||
|
|
f5fb3ae4b6 | ||
|
|
9a4f97c4ed | ||
|
|
1bbcd8f0cc | ||
|
|
415f0dd2aa | ||
|
|
86766ddfef | ||
|
|
e976e86607 | ||
|
|
6399d64033 | ||
|
|
3d8dc3cab8 | ||
|
|
ae1a6e8820 | ||
|
|
52eb27c7b8 | ||
|
|
4b9d90544a | ||
|
|
7871bb039a | ||
|
|
507102dfac | ||
|
|
d6dd722d8b | ||
|
|
b2aed931b5 | ||
|
|
4e6ffc1235 | ||
|
|
811cc433ca | ||
|
|
52cbd973b3 | ||
|
|
397bd15203 | ||
|
|
1f6f6f7caf | ||
|
|
0e7b0633d5 | ||
|
|
2b890be48e | ||
|
|
fac39ba644 | ||
|
|
a28f407f03 | ||
|
|
eee18d2f18 | ||
|
|
6457adba57 | ||
|
|
6ad71bd512 | ||
|
|
0ee897531f | ||
|
|
8c46d1c8bf | ||
|
|
d87873637b | ||
|
|
d6496996b6 | ||
|
|
2df39da2e6 | ||
|
|
6925e290cc | ||
|
|
9e2557b6f4 | ||
|
|
d743f8313e | ||
|
|
7df3f70e9c | ||
|
|
34cf811fd7 | ||
|
|
1d825e6310 | ||
|
|
dd6c806e0f | ||
|
|
ccbdf7418e | ||
|
|
552c1074c0 | ||
|
|
18d35d7730 | ||
|
|
7aaac7b648 | ||
|
|
c472a5a6ea | ||
|
|
527821ee50 | ||
|
|
d2bff1639c | ||
|
|
84cf930537 | ||
|
|
4c3582b8df | ||
|
|
52b029a5a9 | ||
|
|
86047db677 | ||
|
|
2b8548f489 | ||
|
|
44b0d8c696 | ||
|
|
9b70b047a3 | ||
|
|
98310af75a | ||
|
|
5f9bf0e735 | ||
|
|
32c8032bb3 | ||
|
|
10322bbca1 | ||
|
|
88ca49766a | ||
|
|
0d22f3ed0f | ||
|
|
32d104a03b | ||
|
|
97422aeb54 | ||
|
|
7a80d92e72 | ||
|
|
1a2a7654c2 | ||
|
|
a5aaa46790 | ||
|
|
1691655f61 | ||
|
|
f38ab7c9ee | ||
|
|
8fd8a6e70e | ||
|
|
43a319b12b | ||
|
|
511f58e6ec | ||
|
|
350f68e330 | ||
|
|
851b0a62ab | ||
|
|
d97f290ce1 | ||
|
|
2feb10aeec | ||
|
|
8a288c271a | ||
|
|
47fe68abbd | ||
|
|
51d00a8706 | ||
|
|
3f25edccd7 | ||
|
|
2f10ab1bc9 | ||
|
|
4f8c21a075 | ||
|
|
7179f6019c | ||
|
|
2bbf2d7784 | ||
|
|
3ccb4c994e | ||
|
|
46706a7cdb | ||
|
|
383358b11d |
No files matched your search
@@ -10,6 +10,13 @@ source_local() {
|
||||
|
||||
source_local
|
||||
|
||||
if [[ "$CI" != "true" && (-z "$GITHUB_TOKEN" || -z "$CIRCLE_API_USER_TOKEN") ]]; then
|
||||
yellow=`tput setaf 3`
|
||||
reset=`tput sgr0`
|
||||
echo "${yellow}please set GITHUB_TOKEN and CIRCLE_API_USER_TOKEN env variables in .envrc.local file if you wish to release turtle-cli"
|
||||
echo "run 'cp .envrc.local.example .envrc.local' if you don't have one yet and edit the new file${reset}"
|
||||
fi
|
||||
|
||||
export NODE_ENV=development
|
||||
|
||||
export EXPO_TURTLE_TOOLS_DIR="$(pwd)/tools"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export GITHUB_TOKEN=__PUT_YOUR_GITHUB_TOKEN_HERE__ # follow the guide to create one: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
|
||||
export CIRCLE_API_USER_TOKEN=__PUT_YOUR_CIRCLECI_API_TOKEN_HERE__ # create one here: https://circleci.com/account/api
|
||||
@@ -12,3 +12,5 @@ shell.apk
|
||||
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
.envrc.local
|
||||
@@ -8,5 +8,8 @@
|
||||
},
|
||||
"github": {
|
||||
"release": true
|
||||
},
|
||||
"hooks": {
|
||||
"after:release": "yarn release:update:turtle-cli-example"
|
||||
}
|
||||
}
|
||||
@@ -6,3 +6,4 @@ SENTRY_DSN=""
|
||||
ENVIRONMENT="development"
|
||||
REDIS_URL="redis://localhost:6379/0"
|
||||
REDIS_CONFIG_URL="redis://localhost:6379/0"
|
||||
TURTLE_SDK_VERSIONS_SECRET_TOKEN="xeiw7yigha<a_r5aich!oW9Ik2eish8the9Na6Jae-ghoo5ua/t8nu5AeheiTew4"
|
||||
+291
-4
@@ -1,204 +1,491 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
## Unreleased
|
||||
|
||||
## [0.13.7] - 2020-01-15
|
||||
|
||||
### Added
|
||||
|
||||
- Bumped `traveling-fastlane` to 1.11.4 to update CA certs
|
||||
|
||||
## [0.13.6] - 2019-12-17
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed issue with missing request handler for assets-library urls.
|
||||
|
||||
## [0.13.4] - 2019-12-13
|
||||
|
||||
### Added
|
||||
|
||||
- Support for building iOS apps with a wildcard provisioning profile.
|
||||
|
||||
## [0.13.3] - 2019-12-12
|
||||
|
||||
### Fixed
|
||||
|
||||
- Removed private API usage from iOS SDK 36 tarball
|
||||
|
||||
## [0.13.2] - 2019-12-10
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Android App Bundle builds
|
||||
- Fixed issue with Root View Background Color and AppLoading on Android SDK 36 builds
|
||||
|
||||
## [0.13.1] - 2019-12-09
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Android shell app for SDK 36
|
||||
|
||||
## [0.13.0] - 2019-12-09
|
||||
|
||||
### Added
|
||||
|
||||
- Added iOS and Android shell apps for SDK 36
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS client shell app to support SDK 36
|
||||
|
||||
## [0.12.12] - 2019-11-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- A bug that caused `expo.owner` value not to be used if defined.
|
||||
|
||||
## [0.12.11] - 2019-11-20
|
||||
|
||||
### Added
|
||||
|
||||
- Bumped `traveling-fastlane` to 1.11.0
|
||||
|
||||
## [0.12.10] - 2019-11-15
|
||||
|
||||
### Added
|
||||
|
||||
- Add `shellAppSdkVersion` param to `IOSShellAppBuilder` so entitlement keys get properly added in (https://github.com/expo/turtle/pull/162)
|
||||
|
||||
## [0.12.9] - 2019-11-14
|
||||
|
||||
### Added
|
||||
|
||||
- Support for customizing Facebook SDK behavior at buildtime (autoinitialization, logging app events, logging Advertiser ID) (https://github.com/expo/expo/pull/5924)
|
||||
|
||||
## [0.12.8] - 2019-10-29
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK 35 to fix `Linking.openUrl` not opening app if it's already foregrounded (https://github.com/expo/expo/issues/6058)
|
||||
- Enforce Java 8 when using turtle-cli.
|
||||
|
||||
## [0.12.7] - 2019-10-25
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK 35 to fix occasional crash in background due to GCM registration service (https://github.com/expo/expo/issues/4207)
|
||||
|
||||
## [0.12.5] - 2019-10-18
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS shell app for SDK 35 to fix crash when calling `WebBrowser.dismissBrowser` on iOS 13 (https://github.com/expo/expo/issues/5742)
|
||||
|
||||
## [0.12.4] - 2019-10-11
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK 35 to fix occasional crash on launch (https://github.com/expo/expo/issues/5917)
|
||||
|
||||
## [0.12.3] - 2019-10-09
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS client shell app for SDK 35 to fix it from crashing on startup due to having an incomplete GoogleService-Info.plist file.
|
||||
|
||||
## [0.12.2] - 2019-09-27
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK 35 to fix crash on Android <=7 due to battery module
|
||||
|
||||
## [0.12.1] - 2019-09-20
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS shell apps for SDK 33 and 34 to fix iOS 13 issues with fishhook, notification tokens, and ShareSheet
|
||||
- Updated iOS shell app for SDK 35 with a minor fix
|
||||
|
||||
## [0.12.0] - 2019-09-19
|
||||
|
||||
### Added
|
||||
|
||||
- Support for SDK 35 iOS and Android builds.
|
||||
|
||||
### Removed
|
||||
|
||||
- Support for SDK 27-30 iOS and Android builds.
|
||||
|
||||
## [0.11.3] - 2019-09-19
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated SDK34 Android shell app with `expo-branch` fixes.
|
||||
|
||||
## [0.11.2] - 2019-08-21
|
||||
|
||||
### Added
|
||||
|
||||
- Support for GoogleService-Info.plist (>=34.0.0).
|
||||
|
||||
## [0.11.1] - 2019-08-08
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS client shell app with the latest fixes (up to 2.12.3).
|
||||
|
||||
## [0.11.0] - 2019-08-07
|
||||
|
||||
### Changed
|
||||
|
||||
- Enabled back optional modules support, but only for specific unimodules.
|
||||
- Updated SDK34 Android shell app with the latest fixes (up to 2.12.2).
|
||||
- Updated SDK34 iOS shell app with the latest fixes (up to 2.12.3).
|
||||
|
||||
## [0.10.0] - 2019-08-01
|
||||
|
||||
### Changed
|
||||
|
||||
- Fully disabled optional modules on Android for now.
|
||||
- Updated iOS shell apps for SDK 33 and 34 to fix scoped permissions issue.
|
||||
- Updated Android shell app for SDK 34 to work after disabling optional modules.
|
||||
|
||||
## [0.9.1] - 2019-07-29
|
||||
|
||||
### Changed
|
||||
|
||||
- `release-it` version to `12.3.4`.
|
||||
|
||||
## [0.9.0] - 2019-07-29
|
||||
|
||||
### Added
|
||||
|
||||
- Android, iOS standalone shell apps and iOS Expo client shell app for SDK34.
|
||||
- Xcode license check for iOS builds.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Setting `Constants.nativeAppVersion` for Android standalone builds (actually fixed in [expo/expo-cli#878](https://github.com/expo/expo-cli/pull/878)).
|
||||
- Passing `expo.android.config` object from `app.json` to the Android builder.
|
||||
- Fixed crash on launch for iOS standalone apps on iOS 13 (all SDK versions).
|
||||
- Fixed occasional issue on iOS (SDK 33) where the JS bundle cannot be found ("No cache exists for this resource: shell-app.bundle") and a reload would be required.
|
||||
|
||||
## [0.8.11] - 2019-07-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- Android debug builds.
|
||||
|
||||
## [0.8.10] - 2019-07-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- iOS simulator builds.
|
||||
|
||||
## [0.8.9] - 2019-07-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- User authentication.
|
||||
|
||||
## [0.8.8] - 2019-07-11
|
||||
|
||||
### Fixed
|
||||
|
||||
- LocalAuthentication module on iOS (fixes [expo/expo#663](https://github.com/expo/expo/issues/663)).
|
||||
|
||||
## [0.8.7] - 2019-07-05
|
||||
|
||||
### Added
|
||||
|
||||
- Adhoc Builds: use provisioningProfileId if specified.
|
||||
- Registering supported SDK versions in Redis.
|
||||
- Support for 64 bit builds in SDK33.
|
||||
|
||||
## [0.8.6] - 2019-06-25
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for Android build modes: debug or release.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Upgrading the shell app for a given SDK version when the previous version is already downloaded (bug in `turtle-cli`).
|
||||
- Updated Android shell app for SDK33 to include `[email protected]` which fixes crashes on Android 9.0 when showing some Lottie animations.
|
||||
- Schema for `buildModes`.
|
||||
- Updated @expo/xdl to 55.0.7 (fixed reading from binary plist).
|
||||
|
||||
## [0.8.4] - 2019-06-13
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded `sharp` from `0.21.3` to `0.22.1`.
|
||||
- `gulp-cli` is no longer required to build an app with `turtle-cli`.
|
||||
|
||||
## [0.8.3] - 2019-06-13
|
||||
|
||||
### Added
|
||||
|
||||
- Running Android Turtle process with `supervisor` (pod is restarted if there were 5 failures in the last 10 minutes).
|
||||
|
||||
### Changed
|
||||
|
||||
- `turtle-cli` is now fetching the app manifest before running the build.
|
||||
|
||||
## [0.8.2] - 2019-06-11
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK33 to remove `expo-face-detector` and `expo-payments-stripe` from standalone builds.
|
||||
- Updated Android shell app for SDK33 to get rid of `node_modules` for `tools-public`.
|
||||
- From now on, `turtle-cli` installs dependencies for `tools-public` in shell apps for SDK versions < 33.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Android builds with turtle-cli by installing all unmodules if `dependencies` is empty.
|
||||
|
||||
## [0.8.1] - 2019-06-10
|
||||
|
||||
### Changed
|
||||
|
||||
- Add expo dependencies when resolving unimodules.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Support for Android tarballs without `universe-package.json`.
|
||||
|
||||
## [0.8.0] - 2019-06-07
|
||||
|
||||
### Added
|
||||
|
||||
- Turtle CLI logo to the project (created by [@zularizal](https://github.com/zularizal))!
|
||||
- Shell apps for SDK 33.
|
||||
- Support for Android App Bundles (App bundles are built by default, use `-t apk` to build apk).
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK 32 to fix AppAuth issue (https://github.com/expo/expo/pull/4115) and to fix a newer than expected JSC version.
|
||||
- Default value for build timeout to 15 minutes.
|
||||
- Added filtering of logs (strips out download progress) when downloading SDK tools.
|
||||
- `xdl` -> `@expo/xdl`, updated `@expo/xdl`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Generating Android keystore in turtle when one is not passed to turtle-cli (https://github.com/expo/turtle/pull/65).
|
||||
- Upload logs to s3 if build has been canceled or timed out.
|
||||
- Unhandled exception on asset download (xdl).
|
||||
|
||||
## [0.7.2] - 2019-05-09
|
||||
|
||||
### Added
|
||||
|
||||
- Support for Android tarballs without `universe-package.json`.
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded `@expo/traveling-fastlane-darwin` to 1.9.4 (fixes issues with generating provisioning profiles for ad-hoc builds).
|
||||
|
||||
### Removed
|
||||
|
||||
- Support for `CLIENT_LOGGER_LEVEL` env variable.
|
||||
|
||||
## [0.7.1] - 2019-05-06
|
||||
|
||||
### Fixed
|
||||
|
||||
- Resolving `fastlane` version when `LC_ALL` is not set.
|
||||
|
||||
## [0.7.0] - 2019-05-06
|
||||
|
||||
### Added
|
||||
|
||||
- Support for custom Android builds.
|
||||
|
||||
### Changed
|
||||
|
||||
- Refactored logger.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `platform` log field wrongly set to `ios` for Android builds (when using `turtle-cli`).
|
||||
- Brought back `jobID` and `experienceName` fields to Android logs.
|
||||
|
||||
## [0.6.1] - 2019-04-23
|
||||
|
||||
### Added
|
||||
|
||||
- Checking fastlane version before running build (turtle-cli).
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS shell app for SDK 32 to fix AppAuth issue.
|
||||
- Babel replaced by ttypescript.
|
||||
- Updated xdl to 53.5.3 and @expo/spawn-async to 1.4.2, so that error stack traces should be more informative now.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Brought back `jobID` and `experienceName` fields to GCloud logs.
|
||||
|
||||
### Removed
|
||||
|
||||
- `buidAndroidTarballLocally.sh` script (it has been moved to expo repository - [expo/expo#4022](https://github.com/expo/expo/pull/4022)).
|
||||
|
||||
## [0.6.0] - 2019-04-09
|
||||
|
||||
### Changed
|
||||
|
||||
- Removed Branch module from Android shell apps for all SDK versions.
|
||||
|
||||
## [0.5.15] - 2019-04-03
|
||||
|
||||
### Added
|
||||
|
||||
- Turtle smoke tests are now being executed on CircleCI from the context of this repository.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS shell app for SDK 32 (fixes [this loading issue for slow connections](https://github.com/expo/expo/issues/3574)).
|
||||
- Minor infra changes (doesn't affect users).
|
||||
- Error logs format - error objects are now passed in an object being passed as the first argument to logger function.
|
||||
|
||||
### Removed
|
||||
|
||||
- Sending logs to loggly.
|
||||
|
||||
## [0.5.14] - 2019-03-22
|
||||
|
||||
### Added
|
||||
|
||||
- `--config` parameter for turtle-cli commands, which allows to specify a custom path to app.json file
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS shell app for SDK 32 (fixes [this notifications issue](https://github.com/expo/expo/issues/3663)).
|
||||
|
||||
## [0.5.13] - 2019-03-12
|
||||
|
||||
### Added
|
||||
|
||||
- Android SDK version support validation.
|
||||
|
||||
### Changed
|
||||
|
||||
- iOS Enterprise builds don't compile bitcode now.
|
||||
|
||||
## [0.5.12] - 2019-02-26
|
||||
|
||||
### Added
|
||||
|
||||
- Google Cloud logger (as a bunyan stream).
|
||||
|
||||
### Changed
|
||||
|
||||
- Android builder passes the manifest from a build job message if it's available.
|
||||
|
||||
## [0.5.11] - 2019-02-22
|
||||
|
||||
### Added
|
||||
|
||||
- Builder for iOS client apps.
|
||||
|
||||
## [0.5.10] - 2019-02-19
|
||||
|
||||
### Added
|
||||
|
||||
- Registering Turtle version in Redis.
|
||||
|
||||
### Changed
|
||||
|
||||
- Update Android shell app for SDK 32 to fix [update](https://github.com/expo/expo/issues/3504) and [back button](https://github.com/expo/expo/issues/1786) issues.
|
||||
|
||||
## [0.5.9] - 2019-02-06
|
||||
|
||||
- Update iOS shell app for SDK 32 (fixes bare notifications [issue](https://github.com/expo/expo/issues/3223)).
|
||||
|
||||
## [0.5.7] - 2019-01-31
|
||||
|
||||
- Update Android shell app for SDK 32 to fix bundled assets issue.
|
||||
|
||||
## [0.5.6] - 2019-01-25
|
||||
|
||||
- Update iOS shell app for SDK 30, 31 and 32 (built with xcode 10.1).
|
||||
|
||||
## [0.5.5] - 2019-01-24
|
||||
|
||||
### Added
|
||||
|
||||
- Sending build duration in AWS SQS messages (of `FINISHED` and `ERRORED` types).
|
||||
|
||||
## [0.5.4] - 2019-01-22
|
||||
|
||||
### Changed
|
||||
|
||||
- Update iOS shell app for SDK32 to [`expo/expo#0847c10`](https://github.com/expo/expo/commit/0847c1073d38c366866f3d9279ddd662da47dc9b), i.e. v2.10.3 with fixed WebView navigation scheme and upgraded Facebook SDK.
|
||||
|
||||
## [0.5.3] - 2019-01-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Building Android standalone apps ([not accepted license issue](https://github.com/expo/expo/issues/3266)) - updated Android build tools (`build-tools;28.0.3`, `platforms;android-28`).
|
||||
|
||||
## [0.5.2] - 2019-01-18
|
||||
|
||||
### Added
|
||||
|
||||
- The link (in README) to the repository containing `turtle-cli` usage example.
|
||||
- [Contributing guide](CONTRIBUTING.md).
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
|
||||
### Removed
|
||||
|
||||
- `eslint`
|
||||
|
||||
### Changed
|
||||
|
||||
- Fix all `tslint` errors.
|
||||
|
||||
## [0.5.1] - 2019-01-16
|
||||
|
||||
### Changed
|
||||
|
||||
- Update Android shell app for SDK32 that includes `[email protected]`.
|
||||
|
||||
## [0.5.0] - 2019-01-16
|
||||
|
||||
### Added
|
||||
|
||||
- Turtle version is added to the `onFinish` and `onError` build messages.
|
||||
|
||||
### Changed
|
||||
|
||||
- A version property value being sent to the queue. It's now the version number
|
||||
from `package.json` instead of `new`/`old` indicator.
|
||||
from `package.json` instead of `new`/`old` indicator.
|
||||
|
||||
### Removed
|
||||
|
||||
- `--push-p12-path` parameter for `turtle build:ios` command,
|
||||
a Push Notifications Certificate is no longer required to perform a successful
|
||||
iOS standalone app build.
|
||||
a Push Notifications Certificate is no longer required to perform a successful
|
||||
iOS standalone app build.
|
||||
|
||||
## [0.4.3] - 2019-01-09
|
||||
|
||||
### Changed
|
||||
|
||||
- Update iOS shell app for SDK32.
|
||||
- Update Android shell app for SDK32.
|
||||
+2
-2
@@ -24,7 +24,7 @@ To submit a pull request:
|
||||
4. Wait for a review and adjust the code if necessary.
|
||||
|
||||
## Publishing a release
|
||||
- Make sure you have set `GITHUB_TOKEN` and `CIRCLE_API_USER_TOKEN` environment variables in `.envrc.local` file. If you don't have the file, run `cp .envrc.local.example .envrc.local` and edit the file.
|
||||
- To release a new version of `turtle-cli`, run `yarn release` command.
|
||||
- If you wish to release a new *beta* version of `turtle-cli`, run `yarn release:beta` instead.
|
||||
- Update [Changelog](CHANGELOG.md).
|
||||
- In a terminal, `cd` into [expo/turtle-cli-example](https://github.com/expo/turtle-cli-example) repository, run `yarn update-turtle-cli-version` (this script updates `turtle-cli` version number in CI configuration files and commits the changes) and then run `git push`. Thanks!
|
||||
- Update the [changelog](CHANGELOG.md).
|
||||
+2
-90
@@ -1,93 +1,5 @@
|
||||
FROM openjdk:8u141
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# https://github.com/yarnpkg/yarn/issues/2821
|
||||
RUN apt-get update && apt-get install apt-transport-https
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
|
||||
# Install dependencies
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get update && \
|
||||
apt-get install -yq \
|
||||
ant\
|
||||
build-essential\
|
||||
bzip2:i386\
|
||||
file\
|
||||
lib32ncurses5\
|
||||
lib32z1\
|
||||
libc6:i386\
|
||||
libncurses5:i386\
|
||||
libstdc++6:i386\
|
||||
rsync\
|
||||
unzip\
|
||||
yarn\
|
||||
zlib1g:i386\
|
||||
supervisor\
|
||||
--no-install-recommends && \
|
||||
apt-get clean
|
||||
|
||||
ENV NPM_CONFIG_LOGLEVEL warn
|
||||
ENV NODE_VERSION 8.12.0
|
||||
|
||||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
|
||||
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
|
||||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
|
||||
|
||||
# Download and untar SDK
|
||||
ENV ANDROID_HOME /usr/local/android-sdk-linux
|
||||
ENV ANDROID_SDK /usr/local/android-sdk-linux
|
||||
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
||||
RUN mkdir -p ${ANDROID_HOME} && \
|
||||
curl -L "${ANDROID_SDK_URL}" > ${ANDROID_HOME}/sdk.zip && \
|
||||
cd ${ANDROID_HOME} && \
|
||||
unzip -qq sdk.zip && \
|
||||
rm sdk.zip && \
|
||||
mkdir -p ${HOME}/.android && \
|
||||
touch ${HOME}/.android/repositories.cfg
|
||||
|
||||
ENV PATH ${ANDROID_HOME}/platform-tools:${PATH}
|
||||
ENV PATH ${ANDROID_HOME}/tools:${PATH}
|
||||
ENV PATH ${ANDROID_HOME}/tools/bin:${PATH}
|
||||
ENV PATH ${ANDROID_HOME}/build-tools/28.0.3/:${PATH}
|
||||
|
||||
ADD scripts/android/configureAndroidSdk.sh /tmp/configureAndroidSdk.sh
|
||||
RUN /tmp/configureAndroidSdk.sh --install-all-platforms
|
||||
|
||||
# Install Android NDK
|
||||
ENV ANDROID_NDK_VERSION android-ndk-r10e
|
||||
ENV ANDROID_NDK_FILE ${ANDROID_NDK_VERSION}-linux-x86_64.bin
|
||||
ENV ANDROID_NDK_URL https://dl.google.com/android/ndk/${ANDROID_NDK_FILE}
|
||||
ENV ANDROID_NDK /opt/${ANDROID_NDK_VERSION}
|
||||
ENV PATH $ANDROID_NDK:$PATH
|
||||
|
||||
# i have no clue why some of this is here, but it's working elsewhere
|
||||
# it appears to install the NDK version expo needs, so that's cool
|
||||
RUN mkdir /ndk_setup && cd /ndk_setup && \
|
||||
curl -L ${ANDROID_NDK_URL} > ${ANDROID_NDK_FILE} && \
|
||||
chmod +x ${ANDROID_NDK_FILE} && \
|
||||
sync && \
|
||||
./${ANDROID_NDK_FILE} && \
|
||||
mv ./${ANDROID_NDK_VERSION} ${ANDROID_NDK} && \
|
||||
cp -R \
|
||||
${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64 \
|
||||
${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 && \
|
||||
cp -R \
|
||||
${ANDROID_NDK}/toolchains/x86-4.8/prebuilt/linux-x86_64 \
|
||||
${ANDROID_NDK}/toolchains/x86-4.8/prebuilt/linux-x86 && \
|
||||
cd && rm -rf /ndk_setup
|
||||
|
||||
# Support Gradle
|
||||
ENV TERM dumb
|
||||
|
||||
# Install gradle
|
||||
RUN wget https://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
RUN unzip -qq gradle-4.4-all.zip
|
||||
RUN mv gradle-4.4 /usr/local
|
||||
RUN rm gradle-4.4-all.zip
|
||||
ENV GRADLE_HOME /usr/local/gradle-4.4
|
||||
ENV PATH ${GRADLE_HOME}/bin:$PATH
|
||||
# see docker-base/Dockerfile to learn what's installed in the turtle-android-base image
|
||||
FROM gcr.io/exponentjs/turtle-android-base:0.1.0
|
||||
|
||||
ADD . /app/turtle
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
# If you ever need to rebuild this, run:
|
||||
# yarn docker:build-and-push:android-base-image NEW_IMAGE_SEMVER
|
||||
FROM openjdk:8u141
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# https://github.com/yarnpkg/yarn/issues/2821
|
||||
RUN apt-get update && apt-get install apt-transport-https
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
|
||||
# Install dependencies
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get update && \
|
||||
apt-get install -yq \
|
||||
ant\
|
||||
build-essential\
|
||||
bzip2:i386\
|
||||
file\
|
||||
lib32ncurses5\
|
||||
lib32z1\
|
||||
libc6:i386\
|
||||
libncurses5:i386\
|
||||
libstdc++6:i386\
|
||||
rsync\
|
||||
unzip\
|
||||
yarn\
|
||||
zlib1g:i386\
|
||||
supervisor\
|
||||
--no-install-recommends && \
|
||||
apt-get clean
|
||||
|
||||
ENV NPM_CONFIG_LOGLEVEL warn
|
||||
ENV NODE_VERSION 8.12.0
|
||||
|
||||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
|
||||
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
|
||||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
|
||||
|
||||
# Download and untar SDK
|
||||
ENV ANDROID_HOME /usr/local/android-sdk-linux
|
||||
ENV ANDROID_SDK /usr/local/android-sdk-linux
|
||||
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
||||
RUN mkdir -p ${ANDROID_HOME} && \
|
||||
curl -L "${ANDROID_SDK_URL}" > ${ANDROID_HOME}/sdk.zip && \
|
||||
cd ${ANDROID_HOME} && \
|
||||
unzip -qq sdk.zip && \
|
||||
rm sdk.zip && \
|
||||
mkdir -p ${HOME}/.android && \
|
||||
touch ${HOME}/.android/repositories.cfg
|
||||
|
||||
ENV PATH ${ANDROID_HOME}/platform-tools:${PATH}
|
||||
ENV PATH ${ANDROID_HOME}/tools:${PATH}
|
||||
ENV PATH ${ANDROID_HOME}/tools/bin:${PATH}
|
||||
ENV PATH ${ANDROID_HOME}/build-tools/28.0.3/:${PATH}
|
||||
|
||||
ADD scripts/android/configureAndroidSdk.sh /tmp/configureAndroidSdk.sh
|
||||
RUN /tmp/configureAndroidSdk.sh --install-all-platforms
|
||||
|
||||
# Install Android NDK
|
||||
ENV ANDROID_NDK_VERSION android-ndk-r10e
|
||||
ENV ANDROID_NDK_FILE ${ANDROID_NDK_VERSION}-linux-x86_64.bin
|
||||
ENV ANDROID_NDK_URL https://dl.google.com/android/ndk/${ANDROID_NDK_FILE}
|
||||
ENV ANDROID_NDK /opt/${ANDROID_NDK_VERSION}
|
||||
ENV PATH $ANDROID_NDK:$PATH
|
||||
|
||||
# i have no clue why some of this is here, but it's working elsewhere
|
||||
# it appears to install the NDK version expo needs, so that's cool
|
||||
RUN mkdir /ndk_setup && cd /ndk_setup && \
|
||||
curl -L ${ANDROID_NDK_URL} > ${ANDROID_NDK_FILE} && \
|
||||
chmod +x ${ANDROID_NDK_FILE} && \
|
||||
sync && \
|
||||
./${ANDROID_NDK_FILE} && \
|
||||
mv ./${ANDROID_NDK_VERSION} ${ANDROID_NDK} && \
|
||||
cp -R \
|
||||
${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64 \
|
||||
${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 && \
|
||||
cp -R \
|
||||
${ANDROID_NDK}/toolchains/x86-4.8/prebuilt/linux-x86_64 \
|
||||
${ANDROID_NDK}/toolchains/x86-4.8/prebuilt/linux-x86 && \
|
||||
cd && rm -rf /ndk_setup
|
||||
|
||||
# Support Gradle
|
||||
ENV TERM dumb
|
||||
|
||||
# Install gradle
|
||||
RUN wget https://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
RUN unzip -qq gradle-4.4-all.zip
|
||||
RUN mv gradle-4.4 /usr/local
|
||||
RUN rm gradle-4.4-all.zip
|
||||
ENV GRADLE_HOME /usr/local/gradle-4.4
|
||||
ENV PATH ${GRADLE_HOME}/bin:$PATH
|
||||
@@ -138,6 +138,11 @@ spec:
|
||||
secretKeyRef:
|
||||
name: turtle-js-config
|
||||
key: datadog_app_key
|
||||
- name: TURTLE_SDK_VERSIONS_SECRET_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: turtle-js-config
|
||||
key: turtle_sdk_versions_secret_token
|
||||
# other vars
|
||||
- name: GRADLE_DAEMON_DISABLED
|
||||
value: "1"
|
||||
|
||||
+11
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "turtle-cli",
|
||||
"version": "0.8.11",
|
||||
"version": "0.13.6",
|
||||
"description": "The command-line tool for building standalone Expo apps",
|
||||
"preferGlobal": true,
|
||||
"scripts": {
|
||||
@@ -24,7 +24,9 @@
|
||||
"test:smoke:android": "PLATFORM=android yarn test:smoke --testNamePattern=android",
|
||||
"test:smoke:ios": "PLATFORM=ios yarn test:smoke --testNamePattern=iOS",
|
||||
"release": "./scripts/release.sh",
|
||||
"release:beta": "./scripts/releaseBeta.sh"
|
||||
"release:beta": "./scripts/releaseBeta.sh",
|
||||
"release:update:turtle-cli-example": "./scripts/updateTurtleCliExampleRepo.sh",
|
||||
"docker:build-and-push:android-base-image": "./scripts/android/buildAndPushAndroidBaseImage.sh"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@@ -73,17 +75,20 @@
|
||||
"@types/progress": "^2.0.1",
|
||||
"@types/raven": "^2.5.1",
|
||||
"@types/request": "^2.47.1",
|
||||
"@types/request-promise": "^4.1.44",
|
||||
"@types/semver": "^6.0.0",
|
||||
"@types/sharp": "^0.17.8",
|
||||
"@types/tar": "^4.0.0",
|
||||
"@types/uuid": "^3.4.3",
|
||||
"@types/webpack": "^4.32.1",
|
||||
"@types/webpack-dev-server": "^3.1.7",
|
||||
"@types/which": "^1.3.1",
|
||||
"husky": "^1.3.1",
|
||||
"jest": "^23.6.0",
|
||||
"lint-staged": "^8.1.5",
|
||||
"nock": "^10.0.1",
|
||||
"nodemon": "^1.18.11",
|
||||
"release-it": "^10.0.0",
|
||||
"release-it": "^12.3.4",
|
||||
"rimraf": "^2.6.2",
|
||||
"ts-jest": "^23.10.4",
|
||||
"ts-node": "^8.0.3",
|
||||
@@ -96,7 +101,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/spawn-async": "^1.4.2",
|
||||
"@expo/xdl": "56.1.2-rc.1",
|
||||
"@expo/xdl": "57.4.0",
|
||||
"@google-cloud/logging-bunyan": "^0.9.5",
|
||||
"async-retry": "^1.2.1",
|
||||
"aws-sdk": "^2.226.1",
|
||||
@@ -116,6 +121,7 @@
|
||||
"raven": "^2.6.2",
|
||||
"request": "^2.88.0",
|
||||
"request-progress": "^3.0.0",
|
||||
"request-promise": "^4.2.5",
|
||||
"semver": "^6.0.0",
|
||||
"sharp": "0.22.1",
|
||||
"source-map-support": "^0.5.6",
|
||||
@@ -124,6 +130,6 @@
|
||||
"which": "^1.3.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@expo/traveling-fastlane-darwin": "1.9.9"
|
||||
"@expo/traveling-fastlane-darwin": "1.11.4"
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
|
||||
|
||||
IMAGE_TAG="$1"
|
||||
if [[ -z "$IMAGE_TAG" ]]; then
|
||||
echo "usage: yarn docker:build:android-base-image IMAGE_SEMVER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IMAGE_VERSION_FULL_NAME="gcr.io/exponentjs/turtle-android-base:$IMAGE_TAG"
|
||||
IMAGE_LATEST_FULL_NAME="gcr.io/exponentjs/turtle-android-base:latest"
|
||||
|
||||
pushd $ROOT_DIR > /dev/null
|
||||
echo docker build -f docker-base/Dockerfile -t "$IMAGE_VERSION_FULL_NAME" -t "$IMAGE_LATEST_FULL_NAME" .
|
||||
echo "Successfully built $IMAGE_VERSION_FULL_NAME Docker image"
|
||||
echo gcloud docker -- push "$IMAGE_VERSION_FULL_NAME"
|
||||
echo gcloud docker -- push "$IMAGE_LATEST_FULL_NAME"
|
||||
echo "Successfully pushed $IMAGE_VERSION_FULL_NAME Docker image to GCloud"
|
||||
popd > /dev/null
|
||||
@@ -4,6 +4,14 @@ set -eo pipefail
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
|
||||
|
||||
if [[ -z "$GITHUB_TOKEN" || -z "$CIRCLE_API_USER_TOKEN" ]]; then
|
||||
yellow=`tput setaf 3`
|
||||
reset=`tput sgr0`
|
||||
echo "${yellow}please set GITHUB_TOKEN and CIRCLE_API_USER_TOKEN env variables in .envrc.local file if you wish to release turtle-cli"
|
||||
echo "run 'cp .envrc.local.example .envrc.local' if you don't have one yet and edit the new file${reset}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$ROOT_DIR/node_modules/.bin/release-it
|
||||
echo
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
|
||||
@@ -22,5 +22,6 @@ export API_PORT="443"
|
||||
export REDIS_URL="noop"
|
||||
export REDIS_CONFIG_URL="noop"
|
||||
export DATADOG_DISABLED="true"
|
||||
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
|
||||
|
||||
yarn test:smoke:android
|
||||
@@ -20,6 +20,7 @@ export API_PORT="443"
|
||||
export REDIS_URL="noop"
|
||||
export REDIS_CONFIG_URL="noop"
|
||||
export DATADOG_DISABLED="true"
|
||||
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
|
||||
SDK_VERSION=sdk32 $ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
|
||||
|
||||
@@ -22,5 +22,6 @@ export API_PORT="443"
|
||||
export REDIS_URL="noop"
|
||||
export REDIS_CONFIG_URL="noop"
|
||||
export DATADOG_DISABLED="true"
|
||||
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
|
||||
|
||||
yarn test:unit
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
DEPLOY_ENDPOINT_URL="https://circleci.com/api/v1.1/project/github/expo/turtle-cli-example/tree/updates-do-not-remove-me"
|
||||
|
||||
curl -X POST \
|
||||
--header "Content-Type: application/json" \
|
||||
-u $CIRCLE_API_USER_TOKEN: \
|
||||
-d '
|
||||
{
|
||||
"build_parameters": {
|
||||
"CIRCLE_JOB": "update",
|
||||
"TURTLE_TAG": "latest"
|
||||
}
|
||||
}' \
|
||||
$DEPLOY_ENDPOINT_URL 2>/dev/null | jq -r .build_url
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/android-shell-builder-a8e204610e5712391336b378f47962bbb0c04164.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/android-shell-builder-7ce098f40cc82a2f61fed9f1f515d695a83c55b2.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/android-shell-builder-1d9cef3e92482314ed6282d53a60022f878900e2.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-expo-client-a2b1e16f330b36fa0dc627a76caabe4d2ff45f77.tar.gz
|
||||
s3://exp-artifacts/ios-expo-client-33560c83d858e509e71150d4163836d2bfcae2b6.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-27-db356a09877642d64023af98e4e2e1e632fbe4df.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-28-db356a09877642d64023af98e4e2e1e632fbe4df.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-29-db356a09877642d64023af98e4e2e1e632fbe4df.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-30-6863276e6b9605e31228c845a047387571959e9b.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-e1a8bd0ab2e1eba546792c0ffc282b5b202ccc39.tar.gz
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-55848298c7332f7586c4281fa691a4ca31548532.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-dc981c7110b7d508de8e9c352064dc3d745c9f72.tar.gz
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-edd02214dd84368c197df32a2d30a901d6c766ff.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-a2b1e16f330b36fa0dc627a76caabe4d2ff45f77.tar.gz
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-36b57e8ebb96aa8dce286c89bd56e8708eca819d.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-651588ff3445a5d87b3a5b81ec2977c02b22f3a2.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-0115c48ddac4f63e5215541dff804871ef8c1e03.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-7c0999cf6d266e8bfe2d368d863a5a1b7ed73e88.tar.gz
|
||||
@@ -15,6 +15,7 @@ import { PLATFORMS } from 'turtle/constants';
|
||||
import logger from 'turtle/logger';
|
||||
|
||||
const which = util.promisify(_which);
|
||||
const JAVA_REQUIRED_VERSION = 8;
|
||||
const REQUIRED_TOOLS: IToolDefinition[] = [
|
||||
{
|
||||
command: 'bash',
|
||||
@@ -22,16 +23,27 @@ const REQUIRED_TOOLS: IToolDefinition[] = [
|
||||
},
|
||||
{
|
||||
command: 'javac',
|
||||
missingDescription: 'Please install JDK (version 8 or newer) - check https://jdk.java.net/',
|
||||
missingDescription: `Please install JDK (version ${JAVA_REQUIRED_VERSION}) - check https://jdk.java.net/`,
|
||||
testFn: async () => {
|
||||
const { status, stdout } = await ExponentTools.spawnAsyncThrowError(
|
||||
'javac',
|
||||
const { status, stdout, stderr } = await ExponentTools.spawnAsyncThrowError(
|
||||
'java',
|
||||
['-version'],
|
||||
{ stdio: 'pipe' },
|
||||
);
|
||||
if (stdout.match(/no java runtime present/i)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const matchResult = stderr.match(/.*version ".*\.(.*)\..*"/);
|
||||
if (matchResult) {
|
||||
const [, currentJavaVersion] = matchResult;
|
||||
if (Number(currentJavaVersion) !== JAVA_REQUIRED_VERSION) {
|
||||
throw new Error(`You're using a wrong Java version, please install version ${JAVA_REQUIRED_VERSION}`);
|
||||
}
|
||||
} else {
|
||||
logger.warn(`Couldn't find Java version number, assuming you're on Java ${JAVA_REQUIRED_VERSION}...`);
|
||||
}
|
||||
|
||||
return status === 0;
|
||||
},
|
||||
},
|
||||
|
||||
+26
-2
@@ -10,6 +10,7 @@ import { IToolDefinition } from 'turtle/bin/setup/utils/toolsDetector';
|
||||
import { formatShellAppDirectory } from 'turtle/builders/utils/ios/workingdir';
|
||||
import config from 'turtle/config';
|
||||
import { PLATFORMS } from 'turtle/constants';
|
||||
import logger from 'turtle/logger';
|
||||
|
||||
const REQUIRED_TOOLS: IToolDefinition[] = [
|
||||
{
|
||||
@@ -30,7 +31,7 @@ const REQUIRED_TOOLS: IToolDefinition[] = [
|
||||
const fastlaneVersion = parseFastlaneVersion(stdout);
|
||||
if (fastlaneVersion && !semver.satisfies(fastlaneVersion, `>= ${MINIMAL_VERSION}`)) {
|
||||
throw new Error(
|
||||
`Your fastlane on version ${fastlaneVersion}. Please upgrade it to at least ${MINIMAL_VERSION}.`,
|
||||
`Your fastlane is on version ${fastlaneVersion}. Please upgrade it to at least ${MINIMAL_VERSION}.`,
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -47,7 +48,30 @@ const REQUIRED_TOOLS: IToolDefinition[] = [
|
||||
if (stdout.match(/requires xcode/i)) {
|
||||
return false;
|
||||
}
|
||||
return status === 0;
|
||||
|
||||
if (status !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
await ExponentTools.spawnAsyncThrowError('ibtool', ['--version'], { stdio: 'pipe' });
|
||||
} catch (err) {
|
||||
if (err.stderr) {
|
||||
const stderr = err.stderr.trim();
|
||||
if (stderr.match(/Agreeing to the Xcode\/iOS license/)) {
|
||||
logger.error('You have not accepted the Xcode license. Run \'sudo xcodebuild -runFirstLaunch\' to do so.');
|
||||
return false;
|
||||
}
|
||||
if (stderr.match(/The bundle is damaged or missing necessary resources/)) {
|
||||
logger.error(
|
||||
'Make sure to install additional required components. Run \'sudo xcodebuild -runFirstLaunch\' to do so.',
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function ensureToolsAreInstalled(tools: IToolDefinition[]) {
|
||||
try {
|
||||
if (testFn) {
|
||||
if (!await testFn()) {
|
||||
throw new Error('Required tool doesn\'t exist');
|
||||
throw new Error('Required tool is not properly installed');
|
||||
}
|
||||
} else {
|
||||
await which(command);
|
||||
|
||||
@@ -92,9 +92,10 @@ const buildJobObject = async (
|
||||
{ releaseChannel, buildType, buildMode, username, publicUrl, projectDir }: any,
|
||||
credentials: any,
|
||||
) => {
|
||||
const experienceName = `@${_.get(appJSON, 'expo.owner', username)}/${_.get(appJSON, 'expo.slug')}`;
|
||||
const job = {
|
||||
config: {
|
||||
..._.get(appJSON, 'expo.ios.config', {}),
|
||||
..._.get(appJSON, `expo.${platform}.config`, {}),
|
||||
buildType,
|
||||
...(platform === 'android' ? { buildMode } : {}),
|
||||
releaseChannel,
|
||||
@@ -106,7 +107,7 @@ const buildJobObject = async (
|
||||
platform,
|
||||
projectDir,
|
||||
sdkVersion: _.get(appJSON, 'expo.sdkVersion'),
|
||||
experienceName: `@${username}/${_.get(appJSON, 'expo.slug')}`,
|
||||
experienceName,
|
||||
...(credentials && { credentials }),
|
||||
};
|
||||
const url = getExperienceUrl(job.experienceName, job.config.publicUrl);
|
||||
|
||||
@@ -11,7 +11,7 @@ import getOrCreateCredentials from 'turtle/builders/utils/android/credentials';
|
||||
import { formatShellAppDirectory } from 'turtle/builders/utils/android/workingdir';
|
||||
import * as commonUtils from 'turtle/builders/utils/common';
|
||||
import * as imageHelpers from 'turtle/builders/utils/image';
|
||||
import { resolveNativeModules } from 'turtle/builders/utils/unimodules';
|
||||
import { resolveExplicitOptIn } from 'turtle/builders/utils/unimodules';
|
||||
import { uploadBuildToS3 } from 'turtle/builders/utils/uploader';
|
||||
import { ensureCanBuildSdkVersion } from 'turtle/builders/utils/version';
|
||||
import config from 'turtle/config';
|
||||
@@ -73,9 +73,14 @@ async function runShellAppBuilder(
|
||||
const sdkVersion = _.get(manifest, 'sdkVersion', sdkVersionFromJob);
|
||||
const workingDir = formatShellAppDirectory({ sdkVersion });
|
||||
|
||||
// (2019-07-31) We are explicitly choosing to disable this option until we have more
|
||||
// infrastructure/tooling built around optional modules and OTA updates, as right now it's
|
||||
// very easy for developers to break apps in production with optional modules.
|
||||
//
|
||||
// to enable full resolver switch resolveExplicitOptIn to resolveNativeModules
|
||||
logger.info({ buildPhase: 'resolve native modules' }, 'Resolving universal modules dependencies');
|
||||
const enabledModules = semver.satisfies(sdkVersion, '>= 33.0.0')
|
||||
? await resolveNativeModules(workingDir, _.get(manifest, 'dependencies'))
|
||||
? await resolveExplicitOptIn(workingDir, _.get(manifest, 'dependencies'))
|
||||
: null;
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as path from 'path';
|
||||
|
||||
import { IosShellApp } from '@expo/xdl';
|
||||
import { ExponentTools, IosShellApp } from '@expo/xdl';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { formatShellAppDirectory } from 'turtle/builders/utils/ios/workingdir';
|
||||
@@ -41,6 +41,7 @@ export function createBuilderContext(job: IJob): IContext {
|
||||
|
||||
const sdkVersion = sdkVersionFromJob || sdkVersionFromManifest;
|
||||
const workingDir = formatShellAppDirectory({ sdkVersion, buildType: buildType! });
|
||||
const majorSdkVersion = ExponentTools.parseSdkMajorVersion(sdkVersion);
|
||||
|
||||
const context: any = {
|
||||
appDir: join(config.directories.temporaryFilesRoot, appUUID),
|
||||
@@ -84,13 +85,24 @@ export function createBuilderContext(job: IJob): IContext {
|
||||
'Applications',
|
||||
`${EXPOKIT_APP}.app`,
|
||||
);
|
||||
context.workspacePath = path.join(
|
||||
workingDir,
|
||||
'shellAppWorkspaces',
|
||||
'ios',
|
||||
'default',
|
||||
`${EXPOKIT_APP}.xcworkspace`,
|
||||
);
|
||||
if (majorSdkVersion >= 33) {
|
||||
context.workspacePath = path.join(
|
||||
workingDir,
|
||||
'shellAppWorkspaces',
|
||||
'default',
|
||||
'ios',
|
||||
`${EXPOKIT_APP}.xcworkspace`,
|
||||
);
|
||||
} else {
|
||||
context.workspacePath = path.join(
|
||||
workingDir,
|
||||
'shellAppWorkspaces',
|
||||
'ios',
|
||||
'default',
|
||||
`${EXPOKIT_APP}.xcworkspace`,
|
||||
);
|
||||
}
|
||||
|
||||
} else if (buildType === IOS_BUILD_TYPES.CLIENT) {
|
||||
context.outputPath = join(context.appDir, 'archive.xcarchive');
|
||||
context.uploadPath = join(context.buildDir, 'archive.ipa');
|
||||
|
||||
@@ -61,4 +61,4 @@ async function cleanup(ctx: IContext) {
|
||||
}
|
||||
|
||||
const getTemporaryDirs = (ctx: IContext) =>
|
||||
Object.values(pick(ctx, ['appDir', 'provisioningProfileDir']));
|
||||
Object.values(pick(ctx, ['appDir', 'provisioningProfileDir'])) as string[];
|
||||
@@ -36,6 +36,7 @@ export default async function runShellAppBuilder(ctx: IContext, job: IJob): Prom
|
||||
manifest,
|
||||
output: ctx.outputPath,
|
||||
verbose: true,
|
||||
shellAppSdkVersion: sdkVersion,
|
||||
};
|
||||
if (buildType === IOS_BUILD_TYPES.CLIENT) {
|
||||
Object.assign(shellAppParams, {
|
||||
|
||||
@@ -19,6 +19,20 @@ interface IPackageInfo {
|
||||
dependencies: string[];
|
||||
}
|
||||
|
||||
export async function resolveExplicitOptIn(workingdir: string, packages?: string[]): Promise<IUnimoduleEntry[]> {
|
||||
const resolver = new Resolver(workingdir);
|
||||
await resolver.init();
|
||||
|
||||
const optionalModules = ['expo-branch'];
|
||||
resolver.addAll();
|
||||
const modules = packages
|
||||
? resolver.getModules().filter((mod) => !optionalModules.includes(mod.name) || packages.includes(mod.name))
|
||||
: resolver.getModules().filter((mod) => !optionalModules.includes(mod.name));
|
||||
|
||||
modules.forEach(({ name, version }) => { logger.info(`Adding ${name}:${version}`); });
|
||||
return modules;
|
||||
}
|
||||
|
||||
export async function resolveNativeModules(workingdir: string, packages?: string[]): Promise<IUnimoduleEntry[]> {
|
||||
const resolver = new Resolver(workingdir);
|
||||
await resolver.init();
|
||||
@@ -38,8 +52,9 @@ export async function resolveNativeModules(workingdir: string, packages?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resolver.getModules();
|
||||
const modules = resolver.getModules();
|
||||
modules.forEach(({ name, version }) => { logger.info(`Adding ${name}:${version}`); });
|
||||
return modules;
|
||||
}
|
||||
|
||||
async function readCorePackages(workingdir: string) {
|
||||
@@ -101,7 +116,6 @@ class Resolver {
|
||||
return;
|
||||
}
|
||||
const pkg = this.dependencyMap[moduleName];
|
||||
logger.info(`Adding ${moduleName}:${pkg.version}`);
|
||||
this.modulesMap[moduleName] = {
|
||||
name: pkg.name,
|
||||
dirname: pkg.dirname,
|
||||
|
||||
@@ -89,4 +89,7 @@ export default {
|
||||
path.join(os.platform() === 'darwin' ? '/private' : '/', 'tmp', 'turtle'),
|
||||
),
|
||||
},
|
||||
www: {
|
||||
sdkVersionsSecretToken: env('TURTLE_SDK_VERSIONS_SECRET_TOKEN'),
|
||||
},
|
||||
};
|
||||
+23
-9
@@ -55,20 +55,34 @@ export async function getJob() {
|
||||
async function processJob(jobData: any) {
|
||||
const receiptHandle = jobData.ReceiptHandle;
|
||||
const { priority } = jobData;
|
||||
|
||||
let timeoutId;
|
||||
try {
|
||||
const rawJob = JSON.parse(jobData.Body);
|
||||
timeoutId = failAfterMaxJobTime(priority, receiptHandle, rawJob);
|
||||
const job = await sanitizeJob(rawJob);
|
||||
|
||||
let rawJob;
|
||||
let job;
|
||||
try {
|
||||
rawJob = JSON.parse(jobData.Body);
|
||||
timeoutId = failAfterMaxJobTime(priority, receiptHandle, rawJob);
|
||||
logger.info(
|
||||
{ buildJobId: rawJob.id, messageId: jobData.MessageId },
|
||||
`Processing job with priority=${priority.slice(0, priority.length - 8)} timestamp=${Date.now()}`,
|
||||
);
|
||||
job = await sanitizeJob(rawJob);
|
||||
} catch (err) {
|
||||
logger.error({ err, ...rawJob && { buildJobId: rawJob.id } }, 'The build job is invalid');
|
||||
// send message only if we've managed to parse the job json
|
||||
if (rawJob) {
|
||||
await sqs.sendMessage(rawJob.id, BUILD.JOB_STATES.ERRORED, {
|
||||
turtleVersion,
|
||||
buildDuration: 0,
|
||||
reason: 'The build job is invalid',
|
||||
});
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
setCurrentJobId(job.id);
|
||||
const pingerHandle = sqs.changeMessageVisibilityRecurring(priority, jobData.ReceiptHandle, job.id);
|
||||
|
||||
logger.info(
|
||||
`Doing job MessageId=${jobData.MessageId} BuildId=${job.id} `
|
||||
+ `Priority=${priority.slice(0, priority.length - 8)} ${Date.now()}`,
|
||||
);
|
||||
|
||||
const cancelled = await redis.checkIfCancelled(job.id);
|
||||
if (cancelled) {
|
||||
logger.info('The job has been cancelled');
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import EventEmitter from 'events';
|
||||
import path from 'path';
|
||||
|
||||
|
||||
+8
-16
@@ -6,10 +6,7 @@ import { doJob } from 'turtle/jobManager';
|
||||
import logger from 'turtle/logger';
|
||||
import setup from 'turtle/setup';
|
||||
import { checkShouldExit, setShouldExit, turtleVersion } from 'turtle/turtleContext';
|
||||
import { getRedisClient } from 'turtle/utils/redis';
|
||||
|
||||
const REDIS_TURTLE_VERSION_KEY = 'turtle:version';
|
||||
const REDIS_TURTLE_SUPPORTED_SDK_VERSIONS_KEY = `turtle:${config.platform}:sdkVersions`;
|
||||
import { setSupportedSdkVersions, setTurtleVersion } from 'turtle/utils/versions';
|
||||
|
||||
process.on('unhandledRejection', (err) => logger.error({ err }, 'Unhandled promise rejection'));
|
||||
|
||||
@@ -37,25 +34,20 @@ async function main() {
|
||||
}
|
||||
|
||||
try {
|
||||
const redis = await getRedisClient();
|
||||
if (redis) {
|
||||
await redis.set(REDIS_TURTLE_VERSION_KEY, turtleVersion);
|
||||
logger.info(`Registered Turtle version (${turtleVersion}) in Redis`);
|
||||
const sdkVersions = (await findSupportedSdkVersions(config.platform)).join(',');
|
||||
await redis.set(REDIS_TURTLE_SUPPORTED_SDK_VERSIONS_KEY, sdkVersions);
|
||||
logger.info(`Registered supported SDK versions (${sdkVersions}) in Redis`);
|
||||
} else {
|
||||
logger.warn('Couldn\'t set supported SDK versions in Redis (failed to connect to Redis)');
|
||||
}
|
||||
await setTurtleVersion(turtleVersion);
|
||||
logger.info(`Registered Turtle version (${turtleVersion}) in www`);
|
||||
const sdkVersions = (await findSupportedSdkVersions(config.platform)).map((version) => `${version}.0.0`);
|
||||
await setSupportedSdkVersions(config.platform, sdkVersions);
|
||||
logger.info(`Registered supported SDK versions (${sdkVersions}) in www`);
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'Failed to set versions in Redis');
|
||||
logger.error({ err }, 'Failed to register versions in www');
|
||||
}
|
||||
|
||||
while (true) {
|
||||
try {
|
||||
await doJob();
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'Failed to do a job');
|
||||
logger.error({ err }, 'Failed to process a job');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import { URL } from 'url';
|
||||
|
||||
import request from 'request-promise';
|
||||
|
||||
import config from 'turtle/config';
|
||||
|
||||
async function setSupportedSdkVersions(platform: string, sdkVersions: string[]) {
|
||||
const { href } = new URL('/--/api/v2/standalone-build/setSupportedSDKVersions', resolveWWWEndpoint());
|
||||
await request({
|
||||
method: 'POST',
|
||||
uri: href,
|
||||
headers: {
|
||||
'secret-token': config.www.sdkVersionsSecretToken,
|
||||
},
|
||||
body: {
|
||||
platform,
|
||||
sdkVersions,
|
||||
},
|
||||
json: true,
|
||||
});
|
||||
}
|
||||
|
||||
async function setTurtleVersion(version: string) {
|
||||
const { href } = new URL('/--/api/v2/standalone-build/setTurtleVersion', resolveWWWEndpoint());
|
||||
await request({
|
||||
method: 'POST',
|
||||
uri: href,
|
||||
headers: {
|
||||
'secret-token': config.www.sdkVersionsSecretToken,
|
||||
},
|
||||
body: {
|
||||
version,
|
||||
},
|
||||
json: true,
|
||||
});
|
||||
}
|
||||
|
||||
function resolveWWWEndpoint() {
|
||||
const currentEnv = config.deploymentEnv;
|
||||
if (currentEnv === 'production') {
|
||||
return 'https://expo.io';
|
||||
} else if (currentEnv === 'staging') {
|
||||
return 'https://staging.expo.io';
|
||||
} else {
|
||||
return 'http://127.0.0.1:3000';
|
||||
}
|
||||
}
|
||||
|
||||
export { setSupportedSdkVersions, setTurtleVersion };
|
||||
@@ -2,6 +2,9 @@ import * as schemas from 'turtle/jobsSchemas';
|
||||
|
||||
export async function sanitizeJob(job: any) {
|
||||
const schema = (schemas as any)[job.platform];
|
||||
if (!schema) {
|
||||
throw new Error(`Unsupported platform: ${job.platform}`);
|
||||
}
|
||||
const { error, value } = schema.validate(job, { stripUnknown: true });
|
||||
if (error) {
|
||||
throw error;
|
||||
|
||||
Reference in new issue
Block a user