Skip to content

Commit

Permalink
test the dependencies.yml fixture file
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence authored Jul 12, 2023
1 parent 9dcf44f commit 7901431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
output-file: ./fixtures/PHP_EXTENSION_VERSIONS
dry-run: true
- run: bash ./bin/test-textfile.sh ./fixtures/PHP_EXTENSION_VERSIONS
- run: bash ./bin/test-dependencies-yml ./fixtures/dependencies.yml
3 changes: 2 additions & 1 deletion bin/test-dependencies-yml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ filename="$1"
# Check if the filename argument is provided
if [ -z "$filename" ]; then
echo "No filename specified."
echo "Usage: bash script.sh <filename>"
echo "Usage: bash ./bin/test-dependencies-yml.sh <filename>"
exit 1
fi

Expand All @@ -29,6 +29,7 @@ version_pattern='^(v)?([0-9]+(\.[0-9]+)*(-[A-Za-z0-9]+)?|[A-Za-z0-9]+-[0-9]+(\.[
# Initialize a flag variable to track validation status
valid_versions=true

echo "Checking ${filename} for valid versions..."
# Parse the YAML file and validate the current_tag values
while IFS=: read -r key value; do
# Remove leading/trailing whitespace from key and value
Expand Down

0 comments on commit 7901431

Please sign in to comment.