File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
// Check if lock file exists
9
- if (file_exists (dirname ( __FILE__ ) . '/deploy.lock ' )) {
9
+ if (file_exists (__DIR__ . '/deploy.lock ' )) {
10
10
die ('File deploy.lock detected, another process already running ' );
11
11
}
12
12
13
13
// Create lock file
14
- $ fh = fopen (dirname ( __FILE__ ) . '/deploy.lock ' , 'w ' );
14
+ $ fh = fopen (__DIR__ . '/deploy.lock ' , 'w ' );
15
15
fclose ($ fh );
16
16
17
17
// Remove lock file
18
18
function removeLockFile () {
19
- unlink (dirname ( __FILE__ ) . '/deploy.lock ' );
19
+ unlink (__DIR__ . '/deploy.lock ' );
20
20
}
21
21
22
22
// Check if there is a configuration file
23
- if (file_exists (dirname ( __FILE__ ) . '/deploy-config.php ' )) {
24
- require_once dirname ( __FILE__ ) . '/deploy-config.php ' ;
23
+ if (file_exists (__DIR__ . '/deploy-config.php ' )) {
24
+ require_once __DIR__ . '/deploy-config.php ' ;
25
25
} else {
26
26
removeLockFile ();
27
27
die ('File deploy-config.php does not exist ' );
You can’t perform that action at this time.
0 commit comments