File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 3535 }
3636 return version_compare ($ version , '2.3 ' , '>= ' );
3737});
38- env ('release_name ' , date ('YmdHis ' )); // name of folder in releases
38+ env ('release_name ' , function () {
39+ // Set the deployment timezone
40+ if (!date_default_timezone_set (env ('timezone ' ))) {
41+ date_default_timezone_set ('UTC ' );
42+ }
43+
44+ return date ('YmdHis ' );
45+ }); // name of folder in releases
3946
4047/**
4148 * Custom bins.
119126 throw $ e ;
120127 }
121128
122- // Set the deployment timezone
123- if (!date_default_timezone_set (env ('timezone ' ))) {
124- date_default_timezone_set ('UTC ' );
125- }
126-
127129 run ('if [ ! -d {{deploy_path}} ]; then mkdir -p {{deploy_path}}; fi ' );
128130
129131 // Check for existing /current directory (not symlink)
150152 * Release
151153 */
152154task ('deploy:release ' , function () {
153- $ releasePath = "{{deploy_path}}/releases/{{release_name}} " ;
155+ $ releasePath = env ()-> parse ( "{{deploy_path}}/releases/{{release_name}} " ) ;
154156
155157 $ i = 0 ;
156- while (is_dir ( env ()-> parse ( $ releasePath)) && $ i < 42 ) {
158+ while (run ( " if [ -d $ releasePath ]; then echo 'true'; fi " )-> toBool () ) {
157159 $ releasePath .= '. ' . ++$ i ;
158160 }
159161
You can’t perform that action at this time.
0 commit comments