Open
Description
Bug Report
Actual behavior:
Audio and music resource embeds for the doc are broken for arcade <= 2.6.17
because resource listing embeds always reference the development branch.
Expected behavior:
Resource embeds point to an appropriate release tag URL.
Why this matters
TL;DR: Long-term reliability for Arcade release doc.
This affects:
- The current
arcade <= 2.6.17
doc (we moved resources for 3.0) - The EOL 2.6.18 release discussed in the comments of Latest arcade 2.6.17 requires pyglet 2.0.dev23 #2358:
- It exists to help existing 2.6 projects keep working
- It will have warnings that 3.0 is imminent + links to upgrade URLs
- It will be superseded by 3.0 shortly after
- 3.0+ (once we release new versions)
Steps to reproduce/example code:
- Go to https://api.arcade.academy/en/latest/resources.html?highlight=resources#id22
- Observe that all the sound and music embeds are broken
Root cause
See the following line:
arcade/util/create_resources_listing.py
Line 21 in 9a993dd
Proposed Fix
Update our doc build to use the following logic:
- Detect our Arcade version
- Does a matching git tag exist on GitHub?
- Yes: Use a tag-based URL (Example:
https://github.com/pythonarcade/arcade/blob/2.6.17/arcade/resources/music/funkyrobot.mp3
) - No: default to development branch
- Yes: Use a tag-based URL (Example:
- Write base URL to an env variable or temp file to simplify passing data between scripts?
- Update
create_resources_listing.py
to use the selected base URL for embeds