From ea9d99197175f11b81e6feef5c91ec90be351fdd Mon Sep 17 00:00:00 2001 From: Ju Date: Mon, 10 Feb 2020 07:53:45 +0100 Subject: [PATCH] Add automatic update for shfmt --- generic-ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic-ci.sh b/generic-ci.sh index 0d49c63..24136fe 100755 --- a/generic-ci.sh +++ b/generic-ci.sh @@ -24,8 +24,10 @@ case $1 in ;; install-shfmt) - curl -Lo shfmt https://github.com/mvdan/sh/releases/download/v2.6.4/shfmt_v2.6.4_linux_amd64 + SHFMT_VERSION="$(curl -s https://api.github.com/repos/mvdan/sh/releases/latest | jq -r -M '.tag_name')" + curl -Lo shfmt https://github.com/mvdan/sh/releases/download/"${SHFMT_VERSION}"/shfmt_"${SHFMT_VERSION}"_linux_amd64 chmod +x ./shfmt + ./shfmt --version ;; install-yapf) -- GitLab