#sentry #parser #release

sentry-release-parser

A parser for the sentry release name format

12 releases (5 stable)

new 1.1.3 Jun 23, 2021
1.0.0 May 27, 2021
0.6.0 May 28, 2020
0.4.0 Jan 30, 2020
Download history 11/week @ 2021-02-25 12/week @ 2021-03-04 28/week @ 2021-03-11 37/week @ 2021-03-18 111/week @ 2021-03-25 11/week @ 2021-04-01 50/week @ 2021-04-08 40/week @ 2021-04-15 19/week @ 2021-04-22 15/week @ 2021-04-29 29/week @ 2021-05-06 25/week @ 2021-05-13 11/week @ 2021-05-20 69/week @ 2021-05-27 45/week @ 2021-06-03 123/week @ 2021-06-10

221 downloads per month

Apache-2.0

74KB
642 lines

sentry-release-parser

This package implements a release name parser that is used by Sentry.

use sentry_release_parser::Release;

let release = Release::parse("org.example.FooApp@1.0rc1+20200101100").unwrap();
assert_eq!(release.package(), Some("org.example.FooApp"));
assert_eq!(release.version_raw(), "1.0rc1+20200101100");

let version = release.version().unwrap();
assert_eq!(version.major(), 1);
assert_eq!(version.minor(), 0);
assert_eq!(version.patch(), 0);
assert_eq!(version.triple(), (1, 0, 0));
assert_eq!(version.pre(), Some("rc1"));
assert_eq!(version.build_code(), Some("20200101100"));

Features

  • semver: if enabled the version object provides a method to convert it into a semver if it's compatible.
  • serde: turns on serde serialization.

License: Apache-2.0


lib.rs:

This package implements a release name parser that is used by Sentry.

use sentry_release_parser::Release;

let release = Release::parse("org.example.FooApp@1.0rc1+20200101100").unwrap();
assert_eq!(release.package(), Some("org.example.FooApp"));
assert_eq!(release.version_raw(), "1.0rc1+20200101100");

let version = release.version().unwrap();
assert_eq!(version.major(), 1);
assert_eq!(version.minor(), 0);
assert_eq!(version.patch(), 0);
assert_eq!(version.triple(), (1, 0, 0));
assert_eq!(version.pre(), Some("rc1"));
assert_eq!(version.build_code(), Some("20200101100"));

Features

  • semver: if enabled the version object provides a method to convert it into a semver if it's compatible.
  • serde: turns on serde serialization.

Dependencies

~1–1.6MB
~45K SLoC