Skip to content

Commit 8039977

Browse files
committed
Testing deploy hook to travis build
1 parent 5abccad commit 8039977

2 files changed

Lines changed: 13 additions & 21 deletions

File tree

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,15 @@ The code generated is tagged for [phpdoc](https://github.com/phpDocumentor/phpDo
1414

1515
## Code Generation
1616

17-
A quick example:
17+
### Define a configuration file:
1818

19-
```php
20-
$generator = new \MyENA\CloudStackClientGenerator\Generator(new \MyENA\CloudStackClientGenerator\Configuration(
21-
[
22-
'api_key' => '', // YOUR_API_KEY (required)
23-
'secret_key' => '', // YOUR_SECRET_KEY (required)
24-
'host' => 'localhost', // Your CloudStack host (required)
25-
'scheme' => 'http', // http or https (defaults to http)
26-
'port' => 8080, // api port (defaults to 8080)
27-
'path_prefix' => 'client', // url prefix (defaults to 'client')
28-
'api_path' => 'api', // admin api path (defaults to 'api')
29-
'console_path' => 'console', // console api path (defaults to 'console')
30-
'output_dir' => '', // Where you'd like the generated files to go (defaults to ./output)
31-
'namespace' => '', // The namespace that will be used in the generated files (optional)
32-
'http_client' => null, // GuzzleHttp\ClientInterface compatible client
33-
]
34-
));
19+
Please see [files/config_prototype.yml](./files/config_prototype.yml) for an example configuration file
3520

36-
$generator->generate();
37-
```
21+
### Execute build
3822

39-
If you do not specify anything for `output_dir`, all generated files will be placed under [output](./output)
23+
```php
24+
php ./bin/php-cs phpcs:build --config your_config_file.yml
25+
```
4026

4127
There are 3 directories of files created by this generated process, however you will only directly interact with 3:
4228

files/config_prototype.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# php_cs_generator must be the root key
1515
php_cs_generator:
1616
dev: # Name of this config. Accessible via the "config-env" option
17-
host: dev.ourcloudstack.com
17+
scheme: "http"
18+
host: ~ # dev.ourcloudstack.com
19+
port: 8080
20+
apipath: "client/api"
21+
consolepath: "client/console"
22+
out: ~ # choose output path
23+
namespace: "\\MyGreatNamespace"
1824
key: # your api key
1925
secret: # your api secret
2026
prod:

0 commit comments

Comments
 (0)