mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
semgrep: Upgrade semgrep to 0.17.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
d22ec342e2
commit
d35b5027bb
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
version=0.14.0
|
||||
tarball=semgrep-v$version-ubuntu-16.04.tgz
|
||||
sha256=8b9437af0540ed9664904f9603d9d6ad011dad46433cba74e524c7753c7732c9
|
||||
tarball_url=https://github.com/returntocorp/semgrep/releases/download/v$version/$tarball
|
||||
|
||||
check_version () {
|
||||
out="$(semgrep --version 2>/dev/null)" && [ "$out" = "$version" ]
|
||||
}
|
||||
|
||||
if ! check_version; then
|
||||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -r "$tmpdir"' EXIT
|
||||
cd "$tmpdir"
|
||||
wget -nv "$tarball_url"
|
||||
sha256sum -c <<< "$sha256 $tarball"
|
||||
tar -xzf "$tarball" -C /usr/local/lib/ semgrep-files/
|
||||
ln -sf /usr/local/lib/semgrep-files/semgrep /usr/local/bin/semgrep
|
||||
ln -sf /usr/local/lib/semgrep-files/semgrep-core /usr/local/bin/semgrep-core
|
||||
|
||||
# Clean old files from sgrep 0.4.9b5.
|
||||
rm -rf /usr/local/lib/sgrep-lint-files /usr/local/bin/sgrep-lint /usr/local/bin/sgrep
|
||||
|
||||
check_version
|
||||
fi
|
||||
Reference in New Issue
Block a user