Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add increase for SemVer #36

Closed
kevin-lee opened this issue Oct 22, 2019 · 0 comments · Fixed by #42
Closed

Add increase for SemVer #36

kevin-lee opened this issue Oct 22, 2019 · 0 comments · Fixed by #42
Assignees
Labels
Milestone

Comments

@kevin-lee
Copy link
Owner

kevin-lee commented Oct 22, 2019

Task

Summary

Add increase for SemVer

Project Details

Version: unreleased

Description

Add increase for SemVer to increase Major, Minor and Patch.

def increaseMajor(semVer: SemVer): SemVer
def increaseMinor(semVer: SemVer): SemVer
def increasePatch(semVer: SemVer): SemVer
(for {
  v <- SemVer.parse("1.0.0")
  v2 = SemVer.increaseMajor(v)
  s = SemVer.render(v2)
} yield s).foreach(println)
// String = "2.0.0"

(for {
  v <- SemVer.parse("1.0.0")
  v2 = SemVer.increaseMinor(v)
  s = SemVer.render(v2)
} yield s).foreach(println)
// String = "1.1.0"

(for {
  v <- SemVer.parse("1.0.0")
  v2 = SemVer.increasePatch(v)
  s = SemVer.render(v2)
} yield s).foreach(println)
// String = "1.0.1"
@kevin-lee kevin-lee added the task label Oct 22, 2019
@kevin-lee kevin-lee added this to the milestone1 milestone Oct 22, 2019
@kevin-lee kevin-lee self-assigned this Oct 22, 2019
@kevin-lee kevin-lee changed the title Add plus to SemVer Add increase for SemVer Oct 22, 2019
kevin-lee added a commit that referenced this issue Oct 23, 2019
kevin-lee added a commit that referenced this issue Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant