bible-technology / scripture-burrito

Scripture Burrito Schema & Docs 🌯
http://docs.burrito.bible/
MIT License
21 stars 13 forks source link

Use semver regex #201

Closed jag3773 closed 4 years ago

jag3773 commented 4 years ago

Our docs specify that we use semantic versioning so our regex should also support the full range of semver options. Regex copied from https://semver.org/.

In particular, the previous regex only allowed for numbers, which means that our current release, 0.2.0-beta, is actually invalid!

jag3773 commented 4 years ago

Note that an alternate method here would be to change this to a oneOf enumeration of the actual SB releases, this would probably be easier to users/creators of burritos though we would need to keep the list up to date with each new release.

rdb commented 4 years ago

Can't we just use an enum with all previously released versions, which we update every time we make a new release?

jag3773 commented 4 years ago

Yes @rdb, as noted in my follow up comment, too. I think that the enum would be more precise and easier to use.