
Like we do for bindep and tox roles. Allow a user to manage the twine binary outside of the upload-pypi role. This allows a user to better control the path of the executable too. Change-Id: I5c757b29e185ab76495abf3cfb2d853aada77a50 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
28 lines
764 B
YAML
28 lines
764 B
YAML
- name: Install .pypirc configuration file
|
|
template:
|
|
dest: ~/.pypirc
|
|
mode: 0400
|
|
src: .pypirc.j2
|
|
|
|
- name: Find wheels to upload
|
|
find:
|
|
paths: "{{ pypi_path }}"
|
|
patterns: "*.whl"
|
|
register: found_wheels
|
|
|
|
- name: Upload wheel with twine before tarballs
|
|
command: "{{ pypi_twine_executable }} upload -r {{ pypi_repository }} {{ item.path }}"
|
|
with_items: "{{ found_wheels.files }}"
|
|
when: found_wheels.matched|bool
|
|
|
|
- name: Find tarballs to upload
|
|
find:
|
|
paths: "{{ pypi_path }}"
|
|
patterns: "*.tar.gz"
|
|
register: found_tarballs
|
|
|
|
- name: Upload tarballs with twine
|
|
command: "{{ pypi_twine_executable }} upload -r {{ pypi_repository }} {{ item.path }}"
|
|
with_items: "{{ found_tarballs.files }}"
|
|
when: found_tarballs.matched|bool
|