forked from async-aws/aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate
executable file
·32 lines (26 loc) · 995 Bytes
/
generate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env php
<?php
use AsyncAws\Core\EnvVar;
$generatorDir = __DIR__ . '/src/CodeGenerator';
if (!file_exists($generatorDir . '/generate.php')) {
echo "Unable to find the `generate.php` script in `/src/CodeGenerator/`.\n";
exit(1);
}
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
echo "Run `composer install` before you run the `generate` script.\n";
exit(1);
}
require __DIR__ . '/vendor/autoload.php';
if (null === EnvVar::get('ASYNC_AWS_GENERATE_MANIFEST')) {
$_SERVER['ASYNC_AWS_GENERATE_MANIFEST'] = __DIR__ . '/manifest.json';
}
if (null === EnvVar::get('ASYNC_AWS_GENERATE_CACHE')) {
$_SERVER['ASYNC_AWS_GENERATE_CACHE'] = __DIR__ . '/.cache/generate';
}
if (null === EnvVar::get('ASYNC_AWS_GENERATE_SRC')) {
$_SERVER['ASYNC_AWS_GENERATE_SRC'] = __DIR__ . '/src';
}
if (null === EnvVar::get('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
$_SERVER['SYMFONY_PATCH_TYPE_DECLARATIONS'] = 'deprecations=1';
}
require $generatorDir . '/generate.php';