-
Notifications
You must be signed in to change notification settings - Fork 17
/
Envoy.blade.php
43 lines (35 loc) · 1.11 KB
/
Envoy.blade.php
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
@setup
$project = 'octobertricks.com';
$author = isset($author) ? $author : "jemandem";
$branch = isset($branch) ? $branch : "unbekanntem Branch";
$commit = isset($commit) ? $commit : "Ohne Commitnachricht";
@endsetup
@servers(['web' => $user . '@' . $server, 'localhost' => '127.0.0.1'])
@story('deploy')
update
copy-assets
@endstory
@task('update', ['on' => 'web'])
PHP=php72
cd {{ $directory }}
git pull
[ ! -f "composer.phar" ] && wget https://getcomposer.org/composer.phar
$PHP composer.phar install --no-interaction --no-dev --prefer-dist --ignore-platform-reqs
$PHP ./vendor/bin/october install --php=$PHP
$PHP artisan -v october:up
git status -s
@endtask
@task('copy-assets', ['on' => 'localhost'])
THEME=$(ls themes | head -n1)
scp -r themes/$THEME/assets/* {{ $user }}{{ '@' . $server }}:{{ $directory }}/themes/$THEME/assets/
@endtask
@finished
$message = sprintf(
"`%s` von `%s` via `%s`:\n\n> %s",
$project,
ucfirst($author),
$branch,
$commit
);
@slack($slack, 'deployments', $message)
@endfinished