Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fson committed Oct 14, 2020
1 parent d0e62eb commit 439f407
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 30 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -9,6 +9,7 @@
"test": "jest"
},
"devDependencies": {
"@expo/oclif-dev-cli": "1.24.0-expo",
"@types/jest": "^26.0.13",
"eslint": "^6.6.0",
"eslint-config-universe": "^4.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/config/package.json
Expand Up @@ -15,6 +15,7 @@
"@babel/preset-env": "^7.11.5",
"@babel/preset-typescript": "^7.10.4",
"@expo/babel-preset-cli": "^0.2.17",
"@types/color-string": "^1.5.0",
"@types/fs-extra": "^9.0.1",
"@types/hapi__joi": "^17.1.4",
"@types/node": "^12",
Expand Down
65 changes: 42 additions & 23 deletions packages/eas-cli/README.md
Expand Up @@ -8,16 +8,14 @@ EAS command line tool
[![License](https://img.shields.io/npm/l/eas-cli.svg)](https://github.com/expo/eas-cli/blob/main/package.json)

<!-- toc -->

- [eas-cli](#eas-cli)
- [Usage](#usage)
- [Commands](#commands)
* [eas-cli](#eas-cli)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->

# Usage

<!-- usage -->

```sh-session
$ npm install -g eas-cli
$ eas COMMAND
Expand All @@ -29,21 +27,21 @@ USAGE
$ eas COMMAND
...
```

<!-- usagestop -->

# Commands

<!-- commands -->

- [`eas build`](#eas-build)
- [`eas build:status`](#eas-buildstatus)
- [`eas help [COMMAND]`](#eas-help-command)
- [`eas login`](#eas-login)
- [`eas logout`](#eas-logout)
- [`eas update`](#eas-update)
- [`eas update:show`](#eas-updateshow)
- [`eas whoami`](#eas-whoami)
* [`eas build`](#eas-build)
* [`eas build:status`](#eas-buildstatus)
* [`eas credentials`](#eas-credentials)
* [`eas device:create`](#eas-devicecreate)
* [`eas help [COMMAND]`](#eas-help-command)
* [`eas login`](#eas-login)
* [`eas logout`](#eas-logout)
* [`eas update`](#eas-update)
* [`eas update:show`](#eas-updateshow)
* [`eas whoami`](#eas-whoami)

## `eas build`

Expand All @@ -54,7 +52,7 @@ USAGE
$ eas build
```

_See code: [src/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/build/index.ts)_
_See code: [build/commands/build/index.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/build/index.ts)_

## `eas build:status`

Expand All @@ -69,7 +67,29 @@ OPTIONS
--status=(in-queue|in-progress|errored|finished)
```

_See code: [src/commands/build/status.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/build/status.ts)_
_See code: [build/commands/build/status.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/build/status.ts)_

## `eas credentials`

Manage your credentials

```
USAGE
$ eas credentials
```

_See code: [build/commands/credentials.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/credentials.ts)_

## `eas device:create`

register new Apple Devices to use for internal distribution

```
USAGE
$ eas device:create
```

_See code: [build/commands/device/create.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/device/create.ts)_

## `eas help [COMMAND]`

Expand Down Expand Up @@ -97,7 +117,7 @@ USAGE
$ eas login
```

_See code: [src/commands/login.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/login.ts)_
_See code: [build/commands/login.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/login.ts)_

## `eas logout`

Expand All @@ -108,7 +128,7 @@ USAGE
$ eas logout
```

_See code: [src/commands/logout.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/logout.ts)_
_See code: [build/commands/logout.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/logout.ts)_

## `eas update`

Expand All @@ -122,7 +142,7 @@ ALIASES
$ eas update:publish
```

_See code: [src/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/update/index.ts)_
_See code: [build/commands/update/index.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/update/index.ts)_

## `eas update:show`

Expand All @@ -133,7 +153,7 @@ USAGE
$ eas update:show
```

_See code: [src/commands/update/show.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/update/show.ts)_
_See code: [build/commands/update/show.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/update/show.ts)_

## `eas whoami`

Expand All @@ -144,6 +164,5 @@ USAGE
$ eas whoami
```

_See code: [src/commands/whoami.ts](https://github.com/expo/eas-cli/blob/v0.0.0/src/commands/whoami.ts)_

_See code: [build/commands/whoami.ts](https://github.com/expo/eas-cli/blob/v0.0.0/build/commands/whoami.ts)_
<!-- commandsstop -->
87 changes: 87 additions & 0 deletions packages/eas-cli/installer/install.sh
@@ -0,0 +1,87 @@
#!/bin/bash

{
# All code is inside a block to ensure the script executes only when
# downloaded completely.

set -e

ansi_red=31
ansi_yellow=33
ansi_default=39

warn() {
printf "\u001b[%sm%s\u001b[%sm" "$ansi_yellow" "$1" "$ansi_default"
}

abort() {
printf "\u001b[%sm%s\u001b[%sm" "$ansi_red" "$1" "$ansi_default"
exit 1
}

if [[ ! ":\$PATH:" == *":/usr/local/bin:"* ]]; then
abort "Your path is missing /usr/local/bin, you need to add this to use this installer."
fi

hardware="$(uname -m)"
case "$hardware" in
x86_64)
arch="x64"
;;
arm*)
arch="arm"
;;
*)
abort "Unsupported processor architecture $hardware."
;;
esac

case "$(uname -s)" in
Darwin*)
platform="darwin"
if [[ "$arch" != "x64" ]]; then
abort "Unsupported processor architecture $hardware on macOS."
fi
;;
Linux*)
platform="linux"
;;
*)
abort "This installer is only supported on macOS, Linux and Windows Subsystem for Linux."
;;
esac

sudo mkdir -p /usr/local/lib
cd /usr/local/lib
rm -rf eas

url="https://github.com/expo/eas-cli/releases/latest/download/eas-$platform-$arch.tar.gz"

printf "Installing EAS CLI from %s" "$url"
curl $url --location
if [ \$(command -v xz) ]; then
URL=https://cli-assets.heroku.com/heroku-\$OS-\$ARCH.tar.xz
TAR_ARGS="xJ"
else
URL=https://cli-assets.heroku.com/heroku-\$OS-\$ARCH.tar.gz
TAR_ARGS="xz"
fi
if [ $(command -v curl) ]; then
curl "$url" | tar xz
else
wget -O- "$url" | tar xz
fi

rm -f \$(command -v eas) || true
rm -f /usr/local/bin/eas
ln -s /usr/local/lib/eas/bin/eas /usr/local/bin/eas

# Test the bundled node binary and if it doesn't work remove it (fall back to
# node installed in path).
/usr/local/lib/eas/bin/node -v || rm /usr/local/lib/eas/bin/node

# Test the CLI
executable=$(command -v eas)
echo "eas installed to $executable"
eas --version
}
3 changes: 0 additions & 3 deletions packages/eas-cli/package.json
Expand Up @@ -44,7 +44,6 @@
"@babel/preset-env": "^7.11.5",
"@babel/preset-typescript": "^7.10.4",
"@expo/babel-preset-cli": "^0.2.17",
"@expo/oclif-dev-cli": "1.23.0-expo",
"@types/dateformat": "^3.0.1",
"@types/form-data": "^2.5.0",
"@types/fs-extra": "^9.0.1",
Expand Down Expand Up @@ -105,8 +104,6 @@
},
"repository": "expo/eas-cli",
"scripts": {
"postpack": "rm -f oclif.manifest.json",
"prepack": "rm -rf build && tsc -b && oclif-dev manifest && oclif-dev readme",
"test": "jest",
"version": "oclif-dev readme && git add README.md"
},
Expand Down
69 changes: 65 additions & 4 deletions yarn.lock
Expand Up @@ -862,7 +862,7 @@
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-typescript" "^7.10.4"

"@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4":
"@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4":
version "7.11.2"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736"
integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==
Expand Down Expand Up @@ -1181,6 +1181,26 @@
qqjs "^0.3.10"
tslib "^1.9.3"

"@expo/oclif-dev-cli@1.24.0-expo":
version "1.24.0-expo"
resolved "https://registry.yarnpkg.com/@expo/oclif-dev-cli/-/oclif-dev-cli-1.24.0-expo.tgz#4e1f766e79b4d99e3da29318a577952793b143bf"
integrity sha512-Kgj+IsslMn54b9at6upm25gh39F5wNDi4t4cGcXl+sDLN4aeMKK6eV3Y8gKXMDiGkyGSdp4Hvuf6VeSlQEXmcQ==
dependencies:
"@manypkg/get-packages" "^1.1.1"
"@oclif/command" "^1.5.13"
"@oclif/config" "^1.12.12"
"@oclif/errors" "^1.2.2"
"@oclif/plugin-help" "^2.1.6"
cli-ux "^5.2.1"
debug "^4.1.1"
find-yarn-workspace-root "^2.0.0"
fs-extra "^9.0.1"
github-slugger "^1.2.1"
lodash "^4.17.11"
normalize-package-data "^2.5.0"
qqjs "^0.3.10"
tslib "^1.9.3"

"@expo/plist@0.0.10", "@expo/plist@^0.0.10":
version "0.0.10"
resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.0.10.tgz#e126a15543c6c67fd159947ca9e35969657a97f4"
Expand Down Expand Up @@ -2464,6 +2484,27 @@
npmlog "^4.1.2"
write-file-atomic "^2.3.0"

"@manypkg/find-root@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f"
integrity sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==
dependencies:
"@babel/runtime" "^7.5.5"
"@types/node" "^12.7.1"
find-up "^4.1.0"
fs-extra "^8.1.0"

"@manypkg/get-packages@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@manypkg/get-packages/-/get-packages-1.1.1.tgz#7c7e72d0061ab2e61d2ce4da58ce91290a60ac8d"
integrity sha512-J6VClfQSVgR6958eIDTGjfdCrELy1eT+SHeoSMomnvRQVktZMnEA5edIr5ovRFNw5y+Bk/jyoevPzGYod96mhw==
dependencies:
"@babel/runtime" "^7.5.5"
"@manypkg/find-root" "^1.1.0"
fs-extra "^8.1.0"
globby "^11.0.0"
read-yaml-file "^1.1.0"

"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
Expand Down Expand Up @@ -2806,6 +2847,11 @@
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==

"@types/color-string@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@types/color-string/-/color-string-1.5.0.tgz#0a9f3ee6bc9bd4f89693fc3f2bc30d47ad68afc3"
integrity sha512-17/8LWbkfvoKgfnnBvKbUnPTzPtzBlSELf5FPvVt9dRTQW88igOYZZ78us9dmbY1301VtTBEnuPTKspvmtGDxA==

"@types/dateformat@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/dateformat/-/dateformat-3.0.1.tgz#98d747a2e5e9a56070c6bf14e27bff56204e34cc"
Expand Down Expand Up @@ -2947,6 +2993,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.62.tgz#733923d73669188d35950253dd18a21570085d2b"
integrity sha512-qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg==

"@types/node@^12.7.1":
version "12.12.67"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.67.tgz#4f86badb292e822e3b13730a1f9713ed2377f789"
integrity sha512-R48tgL2izApf+9rYNH+3RBMbRpPeW3N8f0I9HMhggeq4UXwBDqumJ14SDs4ctTMhG11pIOduZ4z3QWGOiMc9Vg==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
Expand Down Expand Up @@ -5764,7 +5815,7 @@ globby@^10.0.1:
merge2 "^1.2.3"
slash "^3.0.0"

globby@^11.0.1:
globby@^11.0.0, globby@^11.0.1:
version "11.0.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357"
integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==
Expand Down Expand Up @@ -5824,7 +5875,7 @@ got@^11.5.2:
p-cancelable "^2.0.0"
responselike "^2.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
Expand Down Expand Up @@ -7070,7 +7121,7 @@ jpeg-js@^0.3.4:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-yaml@^3.13.1:
js-yaml@^3.13.1, js-yaml@^3.6.1:
version "3.14.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
Expand Down Expand Up @@ -9018,6 +9069,16 @@ read-pkg@^5.2.0:
parse-json "^5.0.0"
type-fest "^0.6.0"

read-yaml-file@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/read-yaml-file/-/read-yaml-file-1.1.0.tgz#9362bbcbdc77007cc8ea4519fe1c0b821a7ce0d8"
integrity sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==
dependencies:
graceful-fs "^4.1.5"
js-yaml "^3.6.1"
pify "^4.0.1"
strip-bom "^3.0.0"

read@1, read@~1.0.1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
Expand Down

0 comments on commit 439f407

Please sign in to comment.