Deployment suite
- Install sneaky via
npm install -g sneaky - Copy Skyfile.coffee (or Skyfile.js/.json) to the root of your project
- Edit the properties of your Skyfile (host, path, user, etc.), for more information read the example below
sneaky d
- configuate with js/coffee script (Skyfile.js|Skyfile.coffee)
- archive with git
- transport with rsync
- encrypt with ssh
- customized pre hooks and post hooks
sneaky 'sneaky:test', ->
@description = 'Deploy to test environment'
# Version of your project
@version = "v0.0.1"
@user = 'username'
@host = 'your.server'
@path = '/your/destination'
# Ignore the src directory
# Filter pattern
@filter = '''
- src
- node_modules
'''
# Execute before transporting files to server
@before 'coffee -o lib -c src'
# Execute after transporting files to server and link to the current directory
# This script will be executed through ssh command
@after 'npm install --ignore-scripts'
Usage: sneaky <command> taskName
Commands:
deploy deploy application to server
history display previous deploy histories
rollback rollback to the previous version
d alias of deploy
h alias of history
r alias of rollback
Options:
-h, --help output usage information
-v, --version output the version number
-T, --tasks display the tasks
- Convert source code from coffee to js
- Add deployPath to set base source directory on deploy process
- Create temporary directories by timestamp
- Add
forwardcommand
- Configuate with js/coffee script
- Deploy to sub directory with version and timestamp prefix
- fix load js config file bug
- expand destination option to user,host,port,destination properties
- auto convert string typed options to array type
- add option descriptions in readme
- support for .json and .js configuration file
- remove in denpendence
- change configuration file's format from ini to json
- add
includes/onlyoptions to fit different situations,includesis an array mapping to rsync's--include, as the same asexcludes,onlyis a alias ofincludesandexcludes,only: [lib/]is the same asincludes: [lib/], excludes: *. (ignore all files except lib directory) - add
nochdirflag, set this flag to true will deploy the current directory and use all the local files (not only files in git repositories) - fix temp directory name's bug
- remove
servers,user,autoTagconfiguration fields, renamedestinationtodestinations - destinations can use the ssh path
user@server:/path/to/directoryor local path/path/to/directory - support deploy from remote git repositories, e.g.
source = https://github.com/sailxjx/sneaky
- support use
.sneakyrcfile in current pwd
- If you are unfamiliar with rsync's filter rules, read this answer
MIT