Shipit was built to be a Capistrano alternative for people who don't know ruby, or who experienced some issues with it. If you want to write tasks in JavaScript and enjoy the node ecosystem, Shipit is also for you.
shipit.task(name, [deps], fn) // create async task
shipit.blTask(name, [deps], fn) // create sync task
shipit.start(tasks) // start task(s)
shipit.local(command, [options], [callback])
// run command locally
shipit.remote(command, [options], [callback])
// run command remotely
shipit.emit(name) // emit custom event
shipit.on(name, fn) // listen to event
shipit.remoteCopy(src, dest, [options], [callback])
// copy from a local path to a remote dest path
shipit.log('hello %s', 'world')
// the same as `console.log`
shipitfile.js
shipit.initConfig
default:
workspace: '/tmp/slides.kugaevsky.ru'
deployTo: '/var/www/slides.kugaevsky.ru'
repositoryUrl: 'git@github.com:kugaevsky/slides.kugaevsky.ru.git'
ignores: ['.git', 'node_modules']
dirToCopy: 'public'
branch: 'master'
shallowClone: false
rsync: ['--del']
keepReleases: 5
deleteOnRollback: false
key: '/path/to/key'
shipit.initConfig
default: #...
staging:
branch: 'staging'
deployTo: '/var/www/beta.slides.kugaevsky.ru'
production:
servers: 'nick@kugaevsky.ru'
module.exports = (shipit) ->
require('shipit-deploy') shipit
shipit.initConfig
default:
workspace: '/tmp/slides.kugaevsky.ru'
deployTo: '/var/www/slides.kugaevsky.ru'
repositoryUrl: 'git@github.com:kugaevsky/slides.kugaevsky.ru.git'
dirToCopy: 'public'
branch: 'master'
keepReleases: 5
production:
servers: 'nick@kugaevsky.ru'
nginx:
server: 'slides.kugaevsky.ru'
port: 80