gpt4 book ai didi

buildr - 增强 Builder 发布流程

转载 作者:行者123 更新时间:2023-12-03 05:35:19 26 4
gpt4 key购买 nike

我想将自定义任务绑定(bind)到默认构建器发布周期中。我想在项目编译、打包、标记和部署之后但在增加版本号并提交之前运行此代码。

我将如何融入发布周期的这一部分?

最佳答案

不幸的是,release 任务并不由您可能会 Hook 和扩展您自己的任务的子任务组成。

引用当前的实现,

# Make a release.
def make
@this_version = extract_version
check
with_release_candidate_version do |release_candidate_buildfile|
args = '-S', 'buildr', "_#{Buildr::VERSION}_", '--buildfile', release_candidate_buildfile
args << '--environment' << Buildr.environment unless Buildr.environment.to_s.empty?
args << 'clean' << 'upload' << 'DEBUG=no'
ruby *args
end
tag_release resolve_tag
update_version_to_next if this_version != resolve_next_version(this_version)
end

正如您所看到的,Buildr fork 了一个单独的进程,并且本质上运行 buildr clean upload 一种可能性是增强 upload 任务并将您的任务添加为依赖项,例如

task :my_custom_task do
# do stuff
end

task :upload => [ :my_custom_task ]

如果这不能满足您的需求,我建议您在 https://issues.apache.org/jira/browse/BUILDR 上提出增强请求.

关于buildr - 增强 Builder 发布流程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6738761/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com