Skip to content

Commit 56542cf

Browse files
committed
Merge pull request #312 from pjcdawkins/box-installer
Box Project-based installer
2 parents e41c2e6 + 87a01b6 commit 56542cf

File tree

8 files changed

+548
-58
lines changed

8 files changed

+548
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
vendor
2+
platform.phar

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ Alternative README versions: [`master`](https://github.com/platformsh/platformsh
1313

1414
### Installation
1515

16+
#### Using the installer
17+
18+
Simply run this command:
19+
20+
curl -sS https://platform.sh/cli/installer | php
21+
22+
#### Using Composer
23+
1624
* [Install Composer globally](https://getcomposer.org/doc/00-intro.md#globally).
1725

1826
* Install the latest stable version of the CLI:
@@ -55,17 +63,17 @@ Start a new shell or type `source <filename>` to load the new configuration.
5563

5664
### Updating
5765

58-
New releases of the CLI are made regularly. You can update with this command:
66+
New releases of the CLI are made regularly.
5967

60-
composer global update
68+
If you installed the CLI using the installer (as a Phar archive), you can update
69+
it using:
70+
71+
platform self-update
6172

62-
If you want to change the version that you are using - for example to upgrade
63-
between major versions (such as `1.x.x` to `2.x.x`) - it may be more effective
64-
to remove and re-install:
73+
Or, if you installed the CLI with Composer globally, you can update with this
74+
command:
6575

66-
composer global remove platformsh/cli
6776
composer global update
68-
composer global require platformsh/cli:@stable
6977

7078
### Usage
7179

@@ -99,6 +107,7 @@ Available commands:
99107
list Lists commands
100108
login Log in to Platform.sh
101109
logout Log out of Platform.sh
110+
self-update (up) Update the CLI to the latest version
102111
web Open the Platform.sh Web UI
103112
activity
104113
activity:list (activities) Get the most recent activities for an environment

box.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"chmod": "0755",
3+
"directories": [
4+
"resources",
5+
"src"
6+
],
7+
"files": [
8+
"platform",
9+
"vendor/autoload.php",
10+
"vendor/herrera-io/phar-update/res/schema.json"
11+
],
12+
"finder": [
13+
{
14+
"in": "vendor",
15+
"name": "*.php",
16+
"exclude": [
17+
"phpunit",
18+
"Tests",
19+
"tests"
20+
]
21+
}
22+
],
23+
"main": "platform",
24+
"output": "platform.phar",
25+
"stub": true
26+
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"symfony/filesystem": "~2.5",
1212
"symfony/options-resolver": "~2.5",
1313
"symfony/process": "~2.5",
14-
"stecman/symfony-console-completion": "0.5.1"
14+
"stecman/symfony-console-completion": "0.5.1",
15+
"herrera-io/phar-update": "^2.0"
1516
},
1617
"suggest": {
1718
"drush/drush": "For Drupal projects"

0 commit comments

Comments
 (0)