Skip to content

Commit

Permalink
🧱 Make installer load the latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin authored Mar 14, 2022
1 parent 72e5022 commit e077e85
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions install
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

LATEST=$(curl --silent "https://api.github.com/repos/jetbrains/qodana-cli/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
RELEASE=${1:-$LATEST}
TMP_DIR="/tmp/tmpinstalldir"
CLI_VERSION=${1:-"1.0.1"}
OUT_DIR=${2:-"/usr/local/bin"}
check_mark="\033[1;32m✓\033[0m"

Expand All @@ -22,7 +24,7 @@ echo -e '
echo -e "
👋 This script will download Qodana CLI to \033[4m/usr/local/bin/qodana\033[0m
If you get 'permission denied' error:
- Specify other dir and version: \033[4mcurl ... | bash -s -- $CLI_VERSION $HOME/.local/bin\033[0m
- Specify other dir and version: \033[4mcurl -fsSL https://jb.gg/qodana-cli/install | bash -s -- $RELEASE $HOME/.local/bin\033[0m
- Or change the owner of $OUT_DIR to your user
"
set -e
Expand All @@ -44,7 +46,6 @@ function install {
set -e
USER="JetBrains"
PROG="qodana"
RELEASE="v$CLI_VERSION"
INSECURE="false"
#bash check
[ ! "$BASH_VERSION" ] && fail "Please use bash instead"
Expand Down

0 comments on commit e077e85

Please sign in to comment.