New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: env to use path params in download url #19526
Conversation
Thanks for taking the time to open a PR!
|
Hi @HarlesPilter, thank you for taking the time to contribute! This is a good start and definitely will help us cover a gap where the users download proxy isn't 1:1 with our download server. I would ask you to expand the scope of the change a bit though. With this PR we're covering the case where the version of cypress the user wants to download is located at exactly I'd like to propose that instead of taking a boolean we take a string template. That way a user can exactly specify how they want their download url constructed. For example: And You'd set The logic would update to check if the CYPRESS_DOWNLOAD_PATH_TEMPLATE is valued, then sub in endpoint, platform and arch, then use the download url. This would allow for all kinds of different download paths
|
Good idea! Implemented the CYPRESS_DOWNLOAD_PATH_TEMPLATE, but I used ${arch} in the template instead of ${arch()} |
User facing changelog
Add CYPRESS_DOWNLOAD_PATH_PARAMS env variable to use path based params instead of query based params in download url.
Additional details
How has the user experience changed?
If the CYPRESS_DOWNLOAD_PATH_PARAMS is set to
true
then cypress is downloaded using path based params(https://download.cypress.io/desktop/0.20.2/OS-ARCH/cypress.zip)If the new env variable is not used then download url doesn't change (uses query based params https://download.cypress.io/desktop/0.20.2?platform=OS&arch=ARCH)
PR Tasks
cypress-documentation
? docs: added documentation for CYPRESS_DOWNLOAD_PATH_PARAMS cypress-documentation#4299type definitions
?cypress.schema.json
?