Skip to content

[skip changelog] Fix installation script's latest tag determination code #772

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

Merged
merged 1 commit into from
Jul 1, 2020
Merged

[skip changelog] Fix installation script's latest tag determination code #772

merged 1 commit into from
Jul 1, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 30, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • The PR follows our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce?

Expand the grep pattern used by the installation script to scrape the latest tag from the GitHub release page to something that should only ever occur once on an HTML page.

  • What is the current behavior?

GitHub changed the HTML of the release page, which resulted in grep finding multiple instances of the pattern, causing the installation script to fail when no version parameter was provided:

$ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
Installing in /home/per/temporary/bin
ARCH=64bit
OS=Linux
Using curl as download tool
TAG=0.11.0
0.11.0
0.11.0
CLI_DIST=arduino-cli_0.11.0
0.11.0
0.11.0_Linux_64bit.tar.gz
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_0.11.0
0.11.0
0.11.0_Linux_64bit.tar.gz
Failed to install arduino-cli
  • What is the new behavior?

The installation script works correctly when no version parameter is provided.

  • Does this PR introduce a breaking change?

No

GitHub changed the HTML of the release page, which resulted in grep finding multiple instances of the pattern, causing the installation script to fail when no version parameter was provided:

$ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
Installing in /home/per/temporary/bin
ARCH=64bit
OS=Linux
Using curl as download tool
TAG=0.11.0
0.11.0
0.11.0
CLI_DIST=arduino-cli_0.11.0
0.11.0
0.11.0_Linux_64bit.tar.gz
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_0.11.0
0.11.0
0.11.0_Linux_64bit.tar.gz
Failed to install arduino-cli

The chosen fix was to expand the grep pattern to something that should only ever occur once on an HTML page.
@per1234 per1234 merged commit 66331bb into arduino:master Jul 1, 2020
@per1234 per1234 self-assigned this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants