Merge "Simplify twine invocation for PyPI uploads"
This commit is contained in:
commit
9d0e54f55b
@ -21,19 +21,6 @@
|
|||||||
msg: "Found no wheels to upload: {{ found_wheels.msg }}"
|
msg: "Found no wheels to upload: {{ found_wheels.msg }}"
|
||||||
when: found_wheels.files == []
|
when: found_wheels.files == []
|
||||||
|
|
||||||
- name: Register packages on the PyPI server (via wheels)
|
|
||||||
command: "{{ pypi_twine_executable }} register --config-file {{ _pypirc_tmp.path }} --repository {{ pypi_repository }} {{ zj_wheel.path }}"
|
|
||||||
with_items: "{{ found_wheels.files }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: zj_wheel
|
|
||||||
when: pypi_register_first
|
|
||||||
|
|
||||||
- name: Upload wheel with twine before tarballs
|
|
||||||
command: "{{ pypi_twine_executable }} upload --config-file {{ _pypirc_tmp.path }} -r {{ pypi_repository }} {{ zj_wheel.path }}"
|
|
||||||
with_items: "{{ found_wheels.files }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: zj_wheel
|
|
||||||
|
|
||||||
- name: Find tarballs to upload
|
- name: Find tarballs to upload
|
||||||
find:
|
find:
|
||||||
paths: "{{ pypi_path }}"
|
paths: "{{ pypi_path }}"
|
||||||
@ -45,20 +32,8 @@
|
|||||||
msg: "Found no tarballs to upload: {{ found_tarballs.msg }}"
|
msg: "Found no tarballs to upload: {{ found_tarballs.msg }}"
|
||||||
when: found_tarballs.files == []
|
when: found_tarballs.files == []
|
||||||
|
|
||||||
- name: Register packages on the PyPI server (via tarballs)
|
- name: Upload wheels and sdist tarballs with twine
|
||||||
command: "{{ pypi_twine_executable }} register --config-file {{ _pypirc_tmp.path }} --repository {{ pypi_repository }} {{ zj_tarball.path }}"
|
command: "{{ pypi_twine_executable }} upload --config-file {{ _pypirc_tmp.path }} -r {{ pypi_repository }} {{ found_wheels.files | map(attribute='path') | join(' ') }} {{ found_tarballs.files | map(attribute='path') | join(' ') }}"
|
||||||
with_items: "{{ found_tarballs.files }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: zj_tarball
|
|
||||||
when:
|
|
||||||
- pypi_register_first
|
|
||||||
- found_wheels.files == []
|
|
||||||
|
|
||||||
- name: Upload tarballs with twine
|
|
||||||
command: "{{ pypi_twine_executable }} upload --config-file {{ _pypirc_tmp.path }} -r {{ pypi_repository }} {{ zj_tarball.path }}"
|
|
||||||
with_items: "{{ found_tarballs.files }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: zj_tarball
|
|
||||||
|
|
||||||
- name: Delete .pypirc configuration file
|
- name: Delete .pypirc configuration file
|
||||||
file:
|
file:
|
||||||
|
Loading…
Reference in New Issue
Block a user