Skip to content

Commit

Permalink
release 0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
the5fire committed May 14, 2018
1 parent 7b68f39 commit a5a8df9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ essay是基于Fabric开发,在使用上依赖于pypi Server和github/Gitlab。
虚拟环境目录名:依赖于fabfile中设置的 env.VIRTUALENV_PREFIX='~/essay_demo_webpy' ,这里参数为a,表示将在服务器家目录下得essay_demo_webpy目录下创建一个目录为 a 的virtualenv环境。
profile:用来控制程序处于什么状态,比如可以传递debug进去,需要程序自己处理。参数会被传递到supervisord.conf中。

> 0.0.7 新增:
> 可以在fabfile中增加:
def pre_deploy(version, venv, profile):
do_something()
env.DEPLOY_PRE_DEPLOY = pre_deploy

def post_deploy(version, venv, profile):
do_something()
env.DEPLOY_POST_DEPLOY = post_deploy

> 来处理部署前后的操作,两个hook均会在虚拟环境激活状态下执行
deploy的内部的过程是:登录-R指定的服务器,在配置的VIRTUALENV_PREFIX目录下创建a虚拟环境,之后在此环境中通过pip安装已打包好的项目,最后通过supervisord来启动程序进程。

6. **快速部署** 针对需要直接部署某个分支或者commit的需求,该功能是基于上面的两个功能: ``build````deploy``
Expand Down
2 changes: 1 addition & 1 deletion essay/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fabric.state import env

env.PYPI_INDEX = 'http://pypi.doubanio.com/simple/'
VERSION = '0.0.6'
VERSION = '0.0.7'
12 changes: 10 additions & 2 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
## 版本记录

* 0.0.6 增加打包wheel包的逻辑;修复pip版本大于10时判断bug;支持自定义虚拟环境初始化命令;
* 0.0.4 优化supervisor启动命令,增加启动失败重试机制;
* 0.0.7
- 去掉遗留的print用法;
- 增加deploy函数前后hooks;
* 0.0.6
- 增加打包wheel包的逻辑;
- 修复pip版本大于10时判断bug;
- 支持自定义虚拟环境初始化命令;
* 0.0.4
- 优化supervisor启动命令;
- 增加启动失败重试机制;

0 comments on commit a5a8df9

Please sign in to comment.