rocketeers / rocketeer

Send your projects up in the clouds
http://rocketeer.autopergamene.eu/
MIT License
2.66k stars 217 forks source link

Different hooks for connections #767

Open iantearle opened 6 years ago

iantearle commented 6 years ago

Is it possible to define different hooks for each connection?

ishegg commented 6 years ago

I'm not sure if there's an official way, but I can think of two:


'after'  => [
    'deploy'  => [
        function ($task) {
            $env = $task->connections->getConnection();
            if ($env === "staging") {
                // do staging-specific stuff
            }
        }
    ],
],```