未知
rehab的Python项目详细描述
康复中心是一个非常简单的工具,它运行一组命令 只有在上次运行后更改了给定的文件时
安装
仅限:
pip install rehab
配置
装入配置文件:
# basic rehab configuration, default values will be pretty similar EXAMPLE_CONFIG = { # where your repositories will checkout to 'repodir': '/var/repos/', # list of repositories: type, name and other params 'repositories': [ ['git', 'git@github.com:kvbik/rehab.git', 'master'], ], # run commands for each file which has changed since the last run 'updatehooks': { 'git@github.com:kvbik/rehab.git': [ ['requirements.txt', 'pip install -r requirements.txt'], ['requirements.txt', 'python setup.py develop'], ['setup.py', 'python setup.py develop'], ], }, } import yaml with open('/etc/my-rehab.yml', 'w') as f: f.write(yaml.dump(EXAMPLE_CONFIG))
并拨打电话:
rehab update -c /etc/my-rehab.yml -d /var/my-rehab.yml