【发布时间】:2020-03-02 01:07:25
【问题描述】:
我的目标是为 Python Wheel 发布提供正常版本号,例如 1.0.0,以及为特定分支提供特定分支的版本号,例如 1.0.0.dev1+hg.5.b11e5e6f0b0b。
不幸的是,Azure DevOps 拒绝大多数版本号为无效,并显示以下两条错误消息之一:
HTTPError: 400 Client Error: Bad Request - The package version provided is invalid. Versions should conform to the format described in PEP 440 and be under 128 characters. (DevOps Activity ID: 0000000-AAAA-2222-3333-11111111111) for url: https://pkgs.dev.azure.com/sample/_packaging/sample_libraries/pypi/upload
for version numbers like:
version='1.0.0.1.dev', ok
version='1.0.0.1.dev1', ok
version='1.0.0.1.dev_2', ok
version='1.0.0.1.dev_2_b', FAIL
version='1.0.0.1.dev_2-3', FAIL
version='1.0.0.1.dev_2.3', FAIL
version='1.0.0.1.dev_2.3', FAIL
version='1.0.0.d1.dev', FAIL
version='1.0.0.d.dev', FAIL
version='1.0.0.1d1.dev', FAIL
version='1.0.0.1d1.dev1', FAIL
version='1.0.0.1.dev1-3', FAIL
version='1.0.0.1.dev1.3', FAIL
version='1.0.0.1.dev1.3', FAIL
version='1.0.0.1.1.3', ok
version='1.0.0.1.1-3.3', FAIL
400 Client Error: Bad Request - The package version provided is invalid. Local version segments are not allowed.
for version numbers like: 1.0.0+33
Azure 管道仅接受上段中标有“ok”的版本号。
有没有办法解决这个问题?有没有办法在 Azure DevOps 中作为工件发布的轮子的版本号中包含开发分支名称?
【问题讨论】:
标签: python azure-devops python-wheel artifact