如何跳过常春藤发布而不会导致错误? [英] How to skip Ivy publish without causing error?

查看:60
本文介绍了如何跳过常春藤发布而不会导致错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果存储库中已经存在工件,我想跳过该工件的发布,但是据我从文档中可以看到,没有办法做到这一点.有一个overwrite属性,但是如果将其设置为false,则在工件存在的情况下将导致发布失败.我当然也不想覆盖该工件.

I would like to skip publishing an artifact if it already exists in the repository, but as far as I can see from the documentation there isn't a way to do this. There is an overwrite attribute, but if set to false that causes the publish to fail if the artifact exists. I definitely don't want to overwrite the artifact, either.

我已经研究过使用<ivy:info><ivy:findrevision>来查看工件是否存在,并设置一个可以在发布目标上使用的属性(例如,作为unless属性),但是这些任务都没有允许我指定要检查的存储库.

I've looked into using <ivy:info> and <ivy:findrevision> to see if the artifact exists and set a property I can use on my publish target (as an unless attribute, for example), but neither of these tasks allows me to specify the repository to check.

我宁愿不使用外部的taskdef,例如antcontrib的try/catch任务.

I'd rather not resort to using an external taskdef, like antcontrib's try/catch tasks.

还有其他建议吗?

推荐答案

如果您不打算保存自己构建的内容,为什么要运行发布"任务?

Why would you run the "publish" task if you don't intend saving what you built?

我使用 buildnumber 任务来确保我的版本号会根据以前发布的版本自动增加.

I use the buildnumber task to ensure that my version number is incremented automatically based on what was previously published.

这篇关于如何跳过常春藤发布而不会导致错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆