current_semver

Crates.iocurrent_semver
lib.rscurrent_semver
version0.1.1
sourcesrc
created_at2023-10-02 14:59:57.738475
updated_at2023-10-02 15:03:01.360805
descriptionGet the current semver type from the environment
homepage
repositoryhttps://github.com/wyatt-herkamp/current_semver
max_upload_size
id990037
size17,873
Wyatt Herkamp (wyatt-herkamp)

documentation

README

current_semver!

This will parse the current version of your crate and create the semver::Version struct.

Usage

pub fn main() {
    /// Make sure to include the semver crate
    let version: semver::Version = current_semver!();
}

Example output

pub fn main() {
    let version = semver::Version { major: 1, minor: 1, patch: 0, pre: semver::Prerelease::new("BETA").unwrap_or_default(), build: semver::BuildMetadata::default() };
}
Commit count: 8

cargo fmt