Handbook
Glossary
bump-prerelease ( semver id -- semver )
Vocabulary
semver
Inputs
semver
an
object
id
an
object
Outputs
semver
an
object
Definition
USING:
accessors
kernel
math
math.parser
sequences
splitting
;
IN:
semver
:
bump-prerelease
( semver id -- semver )
over
prerelease>>
[
[
bump-patch
]
dip
[
"0"
]
[
".0"
append
]
if-empty
]
[
2dup
swap
head?
[
"."
split
dup
[
string>number
]
find-last
[
over
[
string>number
1
+
number>string
]
change-nth
"."
join
nip
]
[
2drop
[
"0"
]
[
".0"
append
]
if-empty
]
if
]
[
drop
[
"0"
]
[
".0"
append
]
if-empty
]
if
]
if-empty
>>prerelease
f
>>build
;