在我的AppVeyor部署脚本中,我使用ps: >-命令根据存储库分支进行部署:
- ps: >-
If ($env:APPVEYOR_REPO_BRANCH -eq 'devel') {
echo not deploying on devel # twine upload --skip-existing -r test dist/*
}
ElseIf ($env:APPVEYOR_REPO_BRANCH -eq 'deploy') {
twine upload --skip-existing dist/*
}
Else {
echo not deploying on other branches
}这将在AppVeyor构建中创建如下错误消息:
twine :
At line:2 char:5
+ twine upload --skip-existing dist/*
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError并且构建显示为失败。奇怪的是,这些包被上传到pypi并可供下载。因此,该命令实际上执行得很好,但由于此异常,构建显示为失败。如果错误消息能提供更多的信息...
下面是在AppVeyor (https://ci.appveyor.com/project/mzwiessele/gpy/build/1.0.361/job/baimi4og179tk3p8)上使用更简单的脚本和完整输出运行的另一次运行
if ($env:APPVEYOR_REPO_BRANCH -eq 'deploy') {
twine upload --skip-existing dist/*
} else {
echo not deploying on other branches
}
twine :
At line:2 char:5
+ twine upload --skip-existing dist/*
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
0%| | 0.00/1.21M [00:00<?, ?bytes/s]
1%| | 8.19K/1.21M [00:00<00:21, 56.1Kbytes/s]
8%|8 | 98.3K/1.21M [00:00<00:14, 77.6Kbytes/s]
33%|###3 | 401K/1.21M [00:00<00:07, 109Kbytes/s]
0%| | 0.00/1.43M [00:00<?, ?bytes/s]
Uploading distributions to https://upload.pypi.org/legacy/
Uploading GPy-1.7.6-cp27-cp27m-win_amd64.whl
Uploading GPy-1.7.6.win-amd64-py2.7.exe
Command executed with exception: https://stackoverflow.com/questions/44632416
复制相似问题