Skip to content

Instantly share code, notes, and snippets.

@dalabarge
Created May 2, 2014 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalabarge/9f1c468e8d7d759efc0b to your computer and use it in GitHub Desktop.
Save dalabarge/9f1c468e8d7d759efc0b to your computer and use it in GitHub Desktop.
@task('setup')
composer install --no-dev
npm install
php artisan key:generate
migrations
php artisan db:seed
build
git commit -am 'Initial commit.'
git push origin master
echo 'Finished setting up new FooBar project!'
@endtask
@task('migrations')
php artisan migrate --package="foo/bar"
php artisan migrate
echo 'Finished migrating databases!'
@endtask
@task('build')
php artisan build
php artisan cache:clear
echo 'Finished building assets!'
@endtask
@dalabarge
Copy link
Author

So you'd do some manual pre-setup stuff then execute envoy run setup which would simply execute all this in the current working directory. Some of it is straight CLI and some runs internal Envoy tasks (there's more to this file than just these three).

I use Vagrant boxes so this command would be executed directly on the VM from the project directory and no SSH is needed. Perhaps we could have a @servers keyword for local or localhost which does not SSH when running the task. Or a switch like --local? Then I could do @task('setup', [ 'on' => ['local', 'web-1', 'web-2'] ]) ... and maybe for backwards compatibility local is not ran unless explicitly declared in an 'on' => ['local'] statement.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment