Skip to content

Commit e077e85

Browse files
authored
🧱 Make installer load the latest tag
1 parent 72e5022 commit e077e85

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

install

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
2+
3+
LATEST=$(curl --silent "https://api.github.com/repos/jetbrains/qodana-cli/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
4+
RELEASE=${1:-$LATEST}
25
TMP_DIR="/tmp/tmpinstalldir"
3-
CLI_VERSION=${1:-"1.0.1"}
46
OUT_DIR=${2:-"/usr/local/bin"}
57
check_mark="\033[1;32m✓\033[0m"
68

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

0 commit comments

Comments
 (0)