Skip to content

Commit 0140ea5

Browse files
committed
Add nightly build support to installation script
Previously, the release version could be specified as an argument to the script, but it didn't support installing the nightly. Since beta testers should always use the latest nightly, an easy method for grabbing it before starting test work will be useful.
1 parent ab32175 commit 0140ea5

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Diff for: docs/installation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/insta
1818
If you would like to use the `arduino-lint` command from any location, install arduino-lint to a directory already in
1919
your `PATH` or add the arduino-lint installation path to your `PATH` environment variable.
2020

21-
If you want to download a specific arduino-lint version, for example `0.9.0`, pass the version number as a parameter
22-
like this:
21+
If you want to download a specific arduino-lint version, for example `0.9.0` or `nightly-latest`, pass the version
22+
number as a parameter like this:
2323

2424
```
2525
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/install.sh | sh -s 0.9.0

Diff for: etc/install.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,17 @@ downloadFile() {
139139
else
140140
ARDUINO_LINT_DIST="${PROJECT_NAME}_${TAG}_${OS}_${ARCH}.tar.gz"
141141
fi
142-
DOWNLOAD_URL="https://downloads.arduino.cc/${PROJECT_NAME}/${ARDUINO_LINT_DIST}"
142+
143+
# Support specifying nightly build versions (e.g., "nightly-latest") via the script argument.
144+
case "$TAG" in
145+
nightly*)
146+
DOWNLOAD_URL="https://downloads.arduino.cc/${PROJECT_NAME}/nightly/${ARDUINO_LINT_DIST}"
147+
;;
148+
*)
149+
DOWNLOAD_URL="https://downloads.arduino.cc/${PROJECT_NAME}/${ARDUINO_LINT_DIST}"
150+
;;
151+
esac
152+
143153
ARDUINO_LINT_TMP_FILE="/tmp/$ARDUINO_LINT_DIST"
144154
echo "Downloading $DOWNLOAD_URL"
145155
httpStatusCode=$(getFile "$DOWNLOAD_URL" "$ARDUINO_LINT_TMP_FILE")

0 commit comments

Comments
 (0)