sftp-publish
v0.1.31
Published
synchronous some files or directories from local to remote, or find some compile svn changed files
Downloads
12
Readme
sftp-publish
- A file synchronization tool
How to install
nodejs & npm
- nodejs >= 0.12.0
Usage
cd /Library/WebServer/fe enter the absolute path of 'rotate.json.localroot (/fe/)'
sftp-publish --fil .css -s -d ./ -h q5 --pub read all the files and the directories which are not committed to svn in the current directory and filter the files whose extensions are 'css',commit to the server 'q5'
Multiple parameters setting --fil .css --fil .js --fil .png
especial parameter -h [email protected]:22 user name pics,ip10.10.10.10,port22
especial parameter -h q2 synchronous to the server 'q2' q2 corresponding 'rotate.json[q2]'
priority of parameters Income parameters to cover the config parameters in 'rotate.json'
sftp-publish arguments
- -f | file 需要单独上传的文件 the files need to upload alone
- -i | ignore 忽略扩展名文件 .js ignore the files whose extensions are 'js'
- --fil | filter 筛选扩展名文件 .js filter the files whose extensions are 'js'
- -s | status 读取当前目录下svn的内容改变 read the svn content changes in the current directory
- -t | time 按时间读取svn的变更 read the svn changes by time
- -d | dir 传入文件夹下的所有文件 income all files in the directory
- -a | all 读取命令执行路径下的所有文件 read all files in the directory which the command excutes
- -l | localroot 设置本地 root路径 默认值 path.lastIndexOf('fe') set the local 'root' path,default "path.lastIndexOf('fe')"
- -r | rotateroot 设置远程服务器 root路径 默认值 /usr/local/fe set the 'root' path of the remote server,default '/usr/local/fe'
- -h | host 设置远程服务器 ip 或 config.json 配置里面的key set the ip address of the remote server or 'key' in 'config.json'
- -P | port 设置远程服务器 port 默认 config.json 配置里面的port set the port number of the remote server ,default 'port' in 'config.json'
- -u | username 设置远程服务器 username 默认 config.json 配置里面的username set the username of the remote server ,default 'username' in 'config.json'
- -p | password 设置远程服务器 password 默认 config.json 配置里面的password set the password of the remote server ,default 'password' in 'config.json'
- -c | config 设置config.json 的路径 set the path of the file 'config.json'
- --pub | publish 发布获取的文件到远程服务器 publish the getting files to the remote server
======================== 功能及使用方法 ========================
... Please view index.js file from document root;
======================== 功能及使用方法 END ========================
sftp-publish rotate.json
{ "q5":{ "ip":"10.11.9.3" }, "username":"root", "password":"123456", "localroot":"/fe/", "port":22, "rotateroot":"/server/nginx/pc/trunk/v1/" }