Fix wheel index generation

What I didn't notice is that on disk the projects are in a/ b/ c/ type
subdirectories, while from the mirror side we paper-over this with
mod_rewrite rules so the projects all look like they're at top-level.

This should make the script descend into each directory correctly to
generate the index.

Change-Id: I89d255e2bcd5b5c86a33dec1a77086c97bde4c7a
This commit is contained in:
Ian Wienand 2020-01-14 14:44:27 +11:00
parent d4fa3f8537
commit 279f5d1f42
1 changed files with 9 additions and 3 deletions

View File

@ -8,13 +8,19 @@
# linear strategy.
run_once: True
- name: Get project directories
# the directories are laid out a/ b/ c/ ... z/ with projects
# underneath (ergo */* match). We actually use mod_rewrite to paper
# over this in the mirror apache config for external users.
shell: 'ls -d {{ afs_dir }}/*/*'
register: directories
- name: Create individual project indexes
# NOTE(ianw) .test to be removed after testing
script: wheel-indexer.py --debug index.html.test
args:
chdir: '{{ afs_dir }}/{{ item.path }}'
chdir: '{{ item }}'
executable: 'python3'
with_filetree: '{{ afs_dir }}/'
when: item.state == 'directory'
loop: '{{ directories.stdout.split("\n") }}'
# NOTE(ianw) remove after testing
ignore_errors: true