Skip to content

Commit

Permalink
Prepare release 2.3.0-rc1 (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaput authored Oct 9, 2023
1 parent c626e86 commit 00cfedd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [
"resolver" = "2"

[workspace.package]
version = "2.3.0-rc0"
version = "2.3.0-rc1"
edition = "2021"

authors = ["Software Mansion <contact@swmansion.com>"]
Expand Down
34 changes: 20 additions & 14 deletions utils/scarb-build-metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,25 @@ mod tests {
/// because this project is tightly coupled with it.
#[test]
fn scarb_version_is_bound_to_cairo_version() {
let nightly_build = crate::SCARB_VERSION.contains("nightly");

let normalize = |v| {
let mut v = Version::parse(v).unwrap();
v.build = BuildMetadata::EMPTY;
if nightly_build {
v.pre = Prerelease::EMPTY;
}
v.to_string()
};

let scarb_version = normalize(crate::SCARB_VERSION);
let cairo_version = normalize(crate::CAIRO_VERSION);
assert_eq!(scarb_version, cairo_version);
let mut scarb = Version::parse(crate::SCARB_VERSION).unwrap();
let mut cairo = Version::parse(crate::CAIRO_VERSION).unwrap();

scarb.build = BuildMetadata::EMPTY;
cairo.build = BuildMetadata::EMPTY;

if scarb.pre.contains("nightly") {
scarb.pre = Prerelease::EMPTY;
cairo.pre = Prerelease::EMPTY;
}

assert_eq!(
(scarb.major, scarb.minor, scarb.patch),
(cairo.major, cairo.minor, cairo.patch),
"versions not in sync:\nscarb {scarb}\ncairo {cairo}"
);
assert!(
scarb.pre >= cairo.pre,
"versions not in sync:\nscarb {scarb}\ncairo {cairo}"
);
}
}

0 comments on commit 00cfedd

Please sign in to comment.