File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2-
3- set -e
4-
52if [[ " $DETEKT_VERSION " == " " ]]; then
63 echo " Privide detekt version in DETEKT_VERSION env variable"
74 exit 1
@@ -10,22 +7,19 @@ if [[ "$KTLINT_VERSION" == "" ]]; then
107 echo " Provide ktlint version in KTLINT_VERSION env variable"
118 exit 1
129fi
13- TOOLS=" $( pwd) /tools"
14- mkdir -p ${TOOLS}
10+ mkdir ${HOME} /.local/bin
1511echo " Installing detekt $DETEKT_VERSION "
16- jar_destination=" ${TOOLS} /lib/detekt"
12+ jar_destination=" ${HOME} /.local /lib/detekt"
1713mkdir -p ${jar_destination}
1814curl -sSL -o ${jar_destination} /detekt-cli.jar " https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION} /detekt-cli-${DETEKT_VERSION} -all.jar"
1915
20- entrypoint_script=" ${TOOLS} /detekt-cli"
16+ entrypoint_script=" ${HOME} /.local/bin /detekt-cli"
2117cat > " $entrypoint_script " << EOM
2218java -jar ${jar_destination} /detekt-cli.jar \$ @
2319EOM
2420chmod +x " $entrypoint_script "
2521detekt-cli --version
2622
2723echo " Installing ktlint $KTLINT_VERSION "
28- curl -sSLO " https://github.com/pinterest/ktlint/releases/download/$KTLINT_VERSION /ktlint" && chmod a+x ktlint && mv ktlint ${TOOLS} /
29- ktlint --version
30-
31- export PATH=" $PATH :$TOOLS "
24+ curl -sSLO " https://github.com/pinterest/ktlint/releases/download/$KTLINT_VERSION /ktlint" && chmod a+x ktlint && mv ktlint ${HOME} /.local/bin/
25+ ktlint --version
You can’t perform that action at this time.
0 commit comments