Skip to content

Commit

Permalink
chore: update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Sep 5, 2023
1 parent d348802 commit eacfc0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions script/fetch-fixtures
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
#!/bin/bash

set -eux

language_names=(
tree-sitter-python
tree-sitter-javascript
tree-sitter-python
tree-sitter-javascript
tree-sitter-json
)

mkdir -p tests/fixtures

for language in ${language_names[@]}; do
language_dir=tests/fixtures/$language
language_url=https://github.com/tree-sitter/$language
for language in "${language_names[@]}"; do
language_dir=tests/fixtures/$language
language_url=https://github.com/tree-sitter/$language

if [ ! -d $language_dir ]; then
git clone $language_url $language_dir --depth=1
fi
if [ ! -d "$language_dir" ]; then
git clone "$language_url" "$language_dir" --depth=1
fi

(
cd $language_dir
git fetch origin master --depth 1
git reset --hard FETCH_HEAD
)
(
cd "$language_dir"
git fetch origin master --depth 1
git reset --hard FETCH_HEAD
)
done
2 changes: 1 addition & 1 deletion script/lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

sources=$(git ls-files | grep '.py$')
flake8 --max-line-length 90 $sources
flake8 --max-line-length 100 $sources

0 comments on commit eacfc0e

Please sign in to comment.