scripts: make update-tools.sh more verbose (#3572)

* Make update-tools.sh more verbose

* Was checking the wrong filehandle
This commit is contained in:
Matt Robinson 2019-11-20 09:41:06 -05:00 committed by GitHub
parent 61c8bcc9a6
commit b5707d1e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
set -ue set -ue
[ -t 1 ] && echo "Checking for updated staticcheck at https://github.com/repos/dominikh/go-tools"
dominikh="$(curl https://api.github.com/repos/dominikh/go-tools/releases/latest -s | jq -r .tag_name)" dominikh="$(curl https://api.github.com/repos/dominikh/go-tools/releases/latest -s | jq -r .tag_name)"
[ -t 1 ] && echo "Latest version of staticcheck is $dominikh"
sed -i'' "s/staticcheck@.*$/staticcheck@$dominikh/" Dockerfile.jenkins sed -i'' "s/staticcheck@.*$/staticcheck@$dominikh/" Dockerfile.jenkins
[ -t 1 ] && echo "Checking for updated golangci-lint at https://github.com/repos/golangci/golangci-lint"
golangci="$(curl https://api.github.com/repos/golangci/golangci-lint/releases -s | jq -r '.[].tag_name' | sort -rV | head -n 1)" golangci="$(curl https://api.github.com/repos/golangci/golangci-lint/releases -s | jq -r '.[].tag_name' | sort -rV | head -n 1)"
[ -t 1 ] && echo "Latest version of golangci-lint is $golangci"
sed -i'' "/golangci-lint.sh/s/v[0-9.]*$/$golangci/" Dockerfile.jenkins sed -i'' "/golangci-lint.sh/s/v[0-9.]*$/$golangci/" Dockerfile.jenkins
sed -i'' "/golangci-lint.sh/s/v[0-9.]*$/$golangci/" Makefile sed -i'' "/golangci-lint.sh/s/v[0-9.]*$/$golangci/" Makefile
git diff git diff