deploy
简介
为项目部署提供相关操作提供接口功能
组件接口
deploy.gs
FDeploy.gs
部署相关操作的基础组件
函数原型 | 函数作用 |
---|---|
ProjectProperties get_properties() | 获取所有项目属性 |
void set_property(string key, mixed value) | 设置项目属性 |
mixed get_property(string key) | 获取项目属性 |
void gen_zip_start_scripts(string output_path) | 生成一组zip启动脚本(.bat/.sh/not_docker.sh/not_docker.bat) |
void gen_partial_container_conf(string output_path) | 仅生成本镜像的容器配置 |
void gen_start_all_scripts(string output_path) | 生成非docker启动的一键启动脚本 |
void gen_container_conf(string output_path) | 收集并且合并所有镜像的配置生成容器配置 |
样例
public void pkg_sample()
{
deploy.main(() {
// 先看看有没有git
if (! locate_command("git"))
{
output_failure("missing git");
return -100;
}
// 再看看有没有gip
if (! locate_command("gip"))
{
output_failure("missing gip");
return -101;
}
// gip版本检查
if (! gip_require("1.8"))
{
output_failure("gip version is too old");
return -102;
}
// 处理成功返回0
return 0;
});
}