vercode β;β;β!π
vercode is compatible with semver, but less restrictive.
Specification
- Versions MUST BE sorted in codepoint order.
- A vercode
<series>
is increased when there is a breaking API change. - A vercode
<series>;<feature>
adds features to an API but does not break the existing API. - A vercode
<series>;<feature>;<fix>
fixes the software in an API compatible with that feature level. - A vercode MUST BE a fully specified
<series>;<feature>;<fix>
. - A vercode MAY HAVE a prerelease, signified by β!β to denote danger.
- A vercode MAY HAVE a build id, signified by βΞβ to denote a different build of the same
<vercode>
. - A
<unicode identifier>
is any unicode character except β!β, βΞβ, or β;β as those are reserved separators.
(Modified) BackusβNaur Form Grammar for vercode versioning
A
<vercode> ::= <vercode base>
| <vercode base> "!" <pre-release>
| <vercode base> "Ξ" <build>
| <vercode base> "!" <pre-release> "Ξ" <build>
<vercode base> ::= <series> ";" <feature> ";" <fix>
<series> :: = <unicode identifier>
<feature> :: = <unicode identifier>
<patch> :: = <unicode identifier>
<pre-release> ::= <unicode identifier>
| <unicode identifier> <pre-release>
<build> ::= <unicode identifier>
| <unicode identifier> <build>
<unicode identifier> ::= <any unicode codepoint - "!" - ";" - "Ξ">
Generate Unicode Identifiters
Since there are multitudes of Unicode characters, we provide scripts to generate the character sets locally.
Python 3
from itertools import count
from unicodedata import category, name
RESERVED_CHARACTERS = {"!", ";", "Ξ"}
def clean_name(c):
try:
uname = name(c)
except ValueError as e:
assert str(e) == 'no such name'
uname = str(e)
return uname
for i in count():
try:
c = chr(i)
except ValueError:
break
if c in RESERVED_CHARACTERS:
continue
print(f'{i:>7} {hex(i):>8} {category(c)} {clean_name(c)}')