Skip to content

Commit

Permalink
travis: reject invalid UUIDs
Browse files Browse the repository at this point in the history
Want to prevent any invalid UUIDs from being entered.

Want to put this in configlet lint, but can't:
exercism/configlet#99
exercism/configlet#168
So it will go in individual tracks' .travis.yml for now.

It appears that the site will accept pretty much arbitrary strings as
UUIDs for now, but we want to make less work for ourselves when valid
UUIDs are required.
  • Loading branch information
petertseng committed Aug 30, 2019
1 parent 53c994e commit 2c835a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ install:
- sdk install ceylon
script:
- bin/configlet lint .
- |
# Check for invalid UUIDs.
# can be removed once `configlet lint` gains this ability.
# Check issue https://github.com/exercism/configlet/issues/99
bad_uuid=$(jq --raw-output '.exercises | map(.uuid) | .[]' config.json | grep -vE '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$')
if [ -n "$bad_uuid" ]; then
echo "invalid UUIDs found! please correct these to be valid UUIDs:"
echo $bad_uuid
exit 1
fi
- bin/compile-all-stubs
- bin/test-all-exercises
- |
Expand Down

0 comments on commit 2c835a8

Please sign in to comment.