Repository navigation
Expand file tree
/
Copy pathstatamic.php
More file actions
126 lines (94 loc) · 2.85 KB
/
Copy pathstatamic.php
File metadata and controls
126 lines (94 loc) · 2.85 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
namespace Deployer;
/*
* As Statamic is a Laravel Package, we will extend the Laravel
* recipe and simply add Statamic specific commands.
*/
require_once __DIR__ . '/laravel.php';
add('recipes', ['statamic']);
add('writable_dirs', [
'storage/statamic',
]);
set('statamic_version', function () {
$result = run('{{bin/php}} {{release_or_current_path}}/please --version');
preg_match_all('/(\d+\.?)+/', $result, $matches);
return $matches[0][0] ?? 'unknown';
});
/*
* Addons
*/
desc('Rebuild the cached addon package manifest');
task('statamic:addons:discover', artisan('statamic:addons:discover'));
/*
* Assets
*/
desc('Generate asset preset manipulations');
task('statamic:assets:generate-presets', artisan('statamic:assets:generate-presets'));
desc('Generate asset metadata files');
task('statamic:assets:meta', artisan('statamic:assets:meta'));
/*
* Git
*/
desc('Git add and commit tracked content');
task('statamic:git:commit', artisan('statamic:git:commit'));
/*
* Glide
*/
desc('Clear the Glide image cache');
task('statamic:glide:clear', artisan('statamic:glide:clear'));
/*
* Responsive Images (not in the core)
*/
desc('Generate responsive images');
task('statamic:responsive:generate', artisan('statamic:responsive:generate'));
desc('Regenerate responsive images');
task('statamic:responsive:regenerate', artisan('statamic:responsive:regenerate'));
/*
* Search
*/
desc('Insert an item into its search indexes');
task('statamic:search:insert', artisan('statamic:search:insert'));
desc('Update a search index');
task('statamic:search:update', artisan('statamic:search:update'));
/*
* Stache
*/
desc('Clear the "Stache" cache');
task('statamic:stache:clear', artisan('statamic:stache:clear'));
desc('Diagnose any problems with the Stache');
task('statamic:stache:doctor', artisan('statamic:stache:doctor'));
desc('Clear and rebuild the "Stache" cache');
task('statamic:stache:refresh', artisan('statamic:stache:refresh'));
desc('Build the "Stache" cache');
task('statamic:stache:warm', artisan('statamic:stache:warm'));
/*
* Static
*/
desc('Clear the static page cache');
task('statamic:static:clear', artisan('statamic:static:clear'));
desc('Warms the static cache by visiting all URLs');
task('statamic:static:warm', artisan('statamic:static:warm'));
/*
* Support
*/
desc('Outputs details helpful for support requests');
task('statamic:support:details', artisan('statamic:support:details'));
/*
* Updated
*/
desc('Run update scripts from specific version');
task('statamic:updates:run', artisan('statamic:updates:run'));
/*
* Main Deploy Script for Statamic, which
* will overwrite the Laravel default.
*/
desc('Deploy your project');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'artisan:storage:link',
'artisan:cache:clear',
'statamic:stache:clear',
'statamic:stache:warm',
'deploy:publish',
]);