spago-0.21.0

Safe Haskell | None
Language | Haskell2010

Spago.Version

Synopsis

- data VersionBump
  - = Major
  - | Minor
  - | Patch
  - | Exact SemVer
- data DryRun
  - = DryRun
  - | NoDryRun
- bumpVersion :: HasPublishEnv env => DryRun -> VersionBump -> RIO env ()
- getNextVersion :: VersionBump -> SemVer -> Either Text SemVer
- parseVersion :: Text -> Either ParsingError SemVer
- parseVersionBump :: Text -> Maybe VersionBump
- unparseVersion :: SemVer -> Text

# Documentation

data VersionBump #

Constructors

Major |
Minor |
Patch |
Exact SemVer |

#### Instances

Instances details

Show VersionBump # |
Instance details Defined in Spago.Version Methods showsPrec :: Int -> VersionBump -> ShowS # show :: VersionBump -> String # showList :: [VersionBump] -> ShowS #
Eq VersionBump # |
Instance details Defined in Spago.Version Methods (==) :: VersionBump -> VersionBump -> Bool # (/=) :: VersionBump -> VersionBump -> Bool #

data DryRun #

Whether to actually perform side-effects

Constructors

DryRun |
NoDryRun |

bumpVersion :: HasPublishEnv env => DryRun -> VersionBump -> RIO env () #

Bump and tag a new version in preparation for release.

getNextVersion :: VersionBump -> SemVer -> Either Text SemVer #

parseVersion :: Text -> Either ParsingError SemVer #

Parses a version, ignoring an optional leading `v`, or returns an error message.

parseVersionBump :: Text -> Maybe VersionBump #

unparseVersion :: SemVer -> Text #

Turns a version into text, with a leading `v`.