lint: Upgrade semgrep from 0.5.0-dev.2 to 0.5.0-dev.4.

The major PROVISION_VERSION bump would not be needed, but it was
missing in commit 5ab62a3514 (#14834),
so I’m doing it here.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-04-30 18:24:55 -07:00 committed by Tim Abbott
parent bdc365d0fe
commit baab041acd
3 changed files with 10 additions and 4 deletions

View File

@ -91,6 +91,7 @@ def run() -> None:
semgrep_command = ["semgrep", "--config=./tools/semgrep.yml", "--error"]
linter_config.external_linter('semgrep-py', [*semgrep_command, "--lang=python"], ['py'],
fix_arg='--autofix',
description="Syntactic Grep (semgrep) Code Search Tool "
"(config: ./tools/semgrep.yml)")

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -e
version=0.5.0-dev.2
version=0.5.0-dev.4
tarball=semgrep-v$version-ubuntu-16.04.tgz
sha256=3959f79b15c900d29567b6cb846831eb7da4c0a10969ffc98a1c9364ea377545
sha256=0696104dd08f507e6f7de0f7dadc50b532e75bd082729243e1220a87d27c5a2d
tarball_url=https://github.com/returntocorp/semgrep/releases/download/v$version/$tarball
check_version () {
@ -16,7 +16,12 @@ if ! check_version; then
cd "$tmpdir"
wget -nv "$tarball_url"
sha256sum -c <<< "$sha256 $tarball"
tar -xzf "$tarball" -C /usr/local/lib/
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

View File

@ -44,4 +44,4 @@ API_FEATURE_LEVEL = 2
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
PROVISION_VERSION = '81.4'
PROVISION_VERSION = '82.0'