Slicer / slicer.org

This site is published at slicer.org.
https://slicer.org
Other
0 stars 8 forks source link

download: Add support for incomplete releases #184

Closed jcfr closed 1 year ago

jcfr commented 1 year ago

This fixes error like the following reported when including parameter like the following in the URL: ?os=<operating_system> where <operating_system> is any of (linux, win, macosx)

Error:

Traceback (most recent call last):
  File "/app/entrypoint.py", line 12, in <module>
    context.render_template()
  File "/app/main.py", line 40, in render_template
    file.write(template.render(**self._variables) + '\n')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.11/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 387, in <module>
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
           ^^^^^^^^^^^^^^^^^^^^^^^
slicerbot commented 1 year ago

download.slicer.org preview

:warning: The download preview is a static website generated using mock data [^1], is temporary and may be updated at anytime [^2] Screenshot from https://deploy-download-preview--slicer-org.netlify.app/download_release_and_nightly.html Screenshot from https://deploy-download-preview--slicer-org.netlify.app/download_only_release.html Screenshot from https://deploy-download-preview--slicer-org.netlify.app/download_only_nightly.html
Screenshot Screenshot Screenshot
Screenshot from https://deploy-download-preview--slicer-org.netlify.app/download_release_and_nightly.html
--
Screenshot

[^1]: See front matter variable download_mock associated with https://raw.githubusercontent.com/Slicer/slicer.org/main/download.markdown [^2]: Due to limitation of Netlify preventing us from having multiple deploy previews associated with a single pull request and the impossibility of using repository secret in a workflow associated with a pull-request originating from forks, the deploy-download-preview site is only updated for pull request originating from this repository and will be overriden after another pull request is pushed or updated.