Skip to content

Added support for version pinning in install.sh #766

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
Jun 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
# See https://github.com/Masterminds/glide/blob/master/LICENSE for more details
# and copyright notice.

#
# Usage:
#
# To install the latest version of the CLI:
# ./install.sh
#
# To pin a specific release of the CLI:
# ./install.sh 0.9.0
#

PROJECT_NAME="arduino-cli"

# BINDIR represents the local bin location, defaults to ./bin.
Expand Down Expand Up @@ -119,7 +129,11 @@ getFile() {
}

downloadFile() {
checkLatestVersion TAG
if [ -z $1 ]; then
checkLatestVersion TAG
else
TAG=$1
fi
echo "TAG=$TAG"
# arduino-cli_0.4.0-rc1_Linux_64bit.[tar.gz, zip]
if [ "$OS" = "Windows" ]; then
Expand Down Expand Up @@ -196,6 +210,6 @@ set -e
initArch
initOS
initDownloadTool
downloadFile
downloadFile $1
installFile
testVersion