-
Notifications
You must be signed in to change notification settings - Fork 121
/
.platform.app.yaml
49 lines (39 loc) · 1.09 KB
/
.platform.app.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: app
type: php:7.4
dependencies:
php:
composer/composer: "^2"
hooks:
build: |
set -e
mkdir -p web
export version=dev-"$PLATFORM_TREE_ID"
composer install -a --no-dev --no-interaction
composer install -d vendor-bin/box --no-interaction
mkdir -p vendor/bin
ln -s "$(realpath vendor-bin/box/vendor/bin/box)" vendor/bin/box
./bin/platform self:build --no-composer-rebuild --yes --replace-version "$version" --output web/platform.phar
cat << EOF > .environment
alias platform="php \${PLATFORM_APP_DIR}/web/platform.phar"
export CLI_URL_PATH=platform.phar
export CLI_BUILD_DATE="$(date)"
export CLI_VERSION="$version"
EOF
mv dist/dev-build-index.php web/index.php
mv dist/installer.php web/installer
export sha256="$(sha256sum web/platform.phar | cut -f1 -d' ')"
cat <<EOF > web/manifest.json
[
{
"version": "$version",
"sha256": "$sha256",
"name": "platform.phar",
"url": "platform.phar"
}
]
EOF
web:
locations:
'/':
root: web
index: ['index.php']