Skip to content

Commit

Permalink
fix: make properties check script dir-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Jul 2, 2024
1 parent 470b490 commit d709d23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/check_duplicate_properties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ while IFS= read -r -d '' FILE; do
done
echo "::endgroup::"
fi
done < <( find "$(git rev-parse --show-cdup)" -wholename "*/src/*.properties" -print0 )
done < <( find "$(git rev-parse --show-toplevel)" -wholename "*/src/*.properties" -print0 )

if [ "$FAIL" -eq 1 ]; then
exit 1
Expand Down
4 changes: 2 additions & 2 deletions tests/verify_mdb_properties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ while IFS= read -r -d '' MDB; do
echo "::group::$MDB"
BLOCK_NAME=$(sed -n "2p" "$MDB" | cut -f2)
BLOCK_DISPLAY_NAME=$(sed -n "2p" "$MDB" | cut -f4)
PROPERTIES_FILE="$(git rev-parse --show-cdup)src/main/java/propertyFiles/$BLOCK_NAME.properties"
PROPERTIES_FILE="$(git rev-parse --show-toplevel)/src/main/java/propertyFiles/$BLOCK_NAME.properties"

# Check correct file exists
if [ ! -r "$PROPERTIES_FILE" ]; then
Expand Down Expand Up @@ -88,7 +88,7 @@ while IFS= read -r -d '' MDB; do

echo "::endgroup::"

done < <( find "$(git rev-parse --show-cdup)scripts/api/data/metadatablocks" -name '*.tsv' -print0 )
done < <( find "$(git rev-parse --show-toplevel)/scripts/api/data/metadatablocks" -name '*.tsv' -print0 )

rm "$SOURCE" "$STRIP_BIN"

Expand Down

0 comments on commit d709d23

Please sign in to comment.