Skip to content

Commit

Permalink
Consolidate tools directories, move things to internal/tools (#2534)
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandrutu authored May 19, 2022
1 parent 639a06c commit e36f52c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ table-check:

.PHONY: schema-check
schema-check:
cd tools && ./schema_check.sh
$(TOOLS_DIR)/schema_check.sh

# Run all checks in order of speed / likely failure.
.PHONY: check
Expand Down
8 changes: 4 additions & 4 deletions tools/schema_check.sh → internal/tools/schema_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ BUILD_TOOL_SCHEMAS_VERSION=0.11.0
# List of vesions that do not require or have a schema.
declare -a skip_versions=("1.0.0" "1.0.1" "1.1.0" "1.2.0" "1.3.0" "1.6.0")

schemas_dir="../schemas"
current_dir=$PWD
root_dir=$PWD
schemas_dir=$root_dir/schemas

# Find all version sections in CHANGELOG that start with a number in 1..9 range.
grep -o -e '## v[1-9].*\s' ../CHANGELOG.md | grep -o '[1-9].*' | while read ver; do
grep -o -e '## v[1-9].*\s' $root_dir/CHANGELOG.md | grep -o '[1-9].*' | while read ver; do
if [[ " ${skip_versions[*]} " == *" $ver "* ]]; then
# Skip this version, it does not need a schema file.
continue
Expand Down Expand Up @@ -52,7 +52,7 @@ for file in $schemas_dir/*; do
exit 2
fi

docker run -v $current_dir/../schemas:/schemas \
docker run -v $schemas_dir:/schemas \
otel/build-tool-schemas:$BUILD_TOOL_SCHEMAS_VERSION --file /schemas/$ver --version=$ver

echo "OK"
Expand Down

0 comments on commit e36f52c

Please sign in to comment.