Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #535 from michaelmoussa/only-for-stages
Added way to execute tasks only for certain stages
- Loading branch information
Showing
7 changed files
with
117 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
<?php | ||
|
||
require __DIR__ . '/../../recipe/common.php'; | ||
|
||
localServer('localhost'); | ||
localServer('server1'); | ||
localServer('server2'); | ||
localServer('server3') | ||
->stage('production'); | ||
localServer('server4') | ||
->stage('production'); | ||
|
||
task('test', function () { | ||
task('test:hello', function () { | ||
writeln('Hello world!'); | ||
}); | ||
|
||
task('test:onlyForStage', function () { | ||
writeln('You should only see this for production'); | ||
}) | ||
->onlyForStage('production'); | ||
|
||
task('test', [ | ||
'test:hello', | ||
'test:onlyForStage' | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters