-
-
Notifications
You must be signed in to change notification settings - Fork 491
Add preference to set a custom update url #865
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
Conversation
Here's some instructions to test this PR:
- download the channel file. This differs based on the OS and the channel you're getting updates from, but now only the nightly channel is available:
- download the latest nightly from https://downloads.arduino.cc/arduino-ide/nightly/[NAME_OF_LATEST_BUILD] and replace
NAME_OF_LATEST_BUILD
with the value of the propertypath
inside of your channel file (e.g.:https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-20220225_Windows_64bit.exe
) - create a folder called
test-updater
- inside
test-updater
, create another folder callednightly
- move the channel file and the build file you've just downloaded inside the
nightly
folder - serve content of test updater with whater local server you want. For example
cd test-updater
python3 -m http.server
- Download and open the PR build of the Arduino IDE you want to test
- Open the User Preferences from the command palette (CTRL/CMD + SHIFT + P)
- Search for the "Update Channel" preference and set it to "nightly"
- Search for the "Update Base URL" preference and set it to the ip address your local server is running on (e.g.:
http://0.0.0.0:8000
) - Close the Arduino IDE and reopen it. You should now see the update dialog
(Hint: after making your tests, make sure to reset the update URL to the default or your Arduino IDE will keep looking for updates from your custom URL)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using this new feature a lot on Windows and Linux. It works perfectly and really improves the ability to test the update capability.
Thanks Alberto!
Motivation
We want to have a way to test the automatic update feature when downloading a build from a PR.
Change description
Add the possibility to change the URL the updater uses to know if there are updates and to download them. This way, anyone could start a local server that serves the files needed for the automatic update and fool the updater to make them think there is a new update to download.
Other information
This is necessary because a PR build of the Arduino IDE will generally be a newer version than the current latest version, so it's difficult to test before merging.
Reviewer checklist